Description Usage Arguments Value Examples
View source: R/write_list_to_Excel.R
Writes a list to a worksheet in an Excel workbook.
1 | write_list_to_Excel(sheet_name, my_list, wb)
|
sheet_name |
A string indicating the name of the worksheet. |
my_list |
A named list with vectors (can have varying sizes). |
wb |
An openxlsx workbook object containing all current worksheets. |
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_list <- list(a=1:3, b=5:12)
write_list_to_Excel("Sheet2", my_list, 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.