Description Usage Arguments Value Examples
View source: R/write_df_to_Excel.R
Writes a data frame to a worksheet in an Excel workbook.
1 | write_df_to_Excel(sheet_name, my_df, wb, incl_rownames = F)
|
sheet_name |
A string indicating the name of the worksheet. |
my_df |
A data frame. |
wb |
An openxlsx workbook object containing all current worksheets. |
incl_rownames |
Logical indicating whether rownames of the input data frame should be printed, default F. |
The workbook with the new sheet added. Does not have to be reassigned to wb in main.
1 2 3 4 | wb <- openxlsx::createWorkbook() # Create a workbook
my_df <- DNase
write_df_to_Excel("Sheet1", my_df, wb)
openxlsx::saveWorkbook(wb, file="filename.xlsx") # Save wb to file
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.