Description Usage Arguments Value Examples
View source: R/write_to_xlsx.R
Write content to an Excel workbook
1 | write_to_xlsx(x, wb_name = NULL, open_wb = TRUE)
|
x |
An R object or list of R objects |
wb_name |
(Optional) The name of the workbook to be created (e.g. 'output.xlsx' or 'output/results.xlsx'). If no value is specified, a new workbook is created in the working directory. |
open_wb |
Whether to open the workbook using Excel once it's been created |
Creates an Excel workbook at the path provided by 'wb_name' or as a new file in the working directory. If 'open_wb = TRUE', the workbook will be opened in Excel if possible.
1 2 3 4 5 6 7 | df_list <- list('iris' = iris, mtcars, 'Arrests' = USArrests)
# With a specified output path
write_to_xlsx(df_list, wb_name = "output/r-default-datasets.xlsx")
# With an automatically-generated output path
write_to_xlsx(df_list)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.