## see package vignette for further examples.
wb <- createWorkbook("Edgar Anderson")
addWorksheet(wb, "S1")
addWorksheet(wb, "S2")
addWorksheet(wb, "S3")
## write data formatted as excel table with table filters
# default table style is "TableStyleMedium2"
writeDataTable(wb, "S1", x = iris)
writeDataTable(wb, "S2", x = mtcars, xy = c("B", 3), rowNames=TRUE, tableStyle="TableStyleLight9")
writeDataTable(wb, "S3", x = mtcars, startRow = 4, rowNames=TRUE, tableStyle="TableStyleMedium17")
saveWorkbook(wb, "writeDataTableExample.xlsx", overwrite = TRUE)
Run the code above in your browser using DataLab