powered by
writeDataTable
Include a data.frame into a workbook applying a tableStyle and an auto width to the column. For better results you could setup options("openxlsx.minWidth" = 6)
data.frame
options("openxlsx.minWidth" = 6)
addDataTable( wb, df, sheet, tableName, tableStyle = "TableStyleMedium1", withFilter = TRUE, firstActiveCol = NULL, ... )
silently the wb
a workbook object
a data.frame
the sheet name. If missing the name of the data.frame
a name for the table in the excel document. If missing the name of the data.frame
a tableStyle name
if TRUE the filter is included
First column active on the the freeze panel
other parameters for the writeDataTable
if (FALSE) { library(openxlxs) options("openxlsx.minWidth" = 6) wb <- createWorkbook(title = "Test addDataTable") addDataTable(wb,iris) saveWorkbook(wb, "test_addDataTable.xlsx") }
Run the code above in your browser using DataLab