Learn R Programming

openxlsx2 (version 0.8)

wb_save: Save Workbook to file

Description

Save Workbook to file

Usage

wb_save(wb, file = NULL, overwrite = TRUE, path = NULL)

Value

the wbWorkbook object, invisibly

Arguments

wb

A wbWorkbook object to write to file

file

A path to save the workbook to

overwrite

If FALSE, will not overwrite when path exists

path

Deprecated argument previously used for file. Please use file in new code.

See Also

Other workbook wrappers: wb_add_chartsheet(), wb_add_data_table(), wb_add_data(), wb_add_formula(), wb_add_pivot_table(), wb_add_worksheet(), wb_base_font, wb_clone_worksheet(), wb_col_widths, wb_copy_cells(), wb_creators, wb_freeze_pane(), wb_grouping, wb_merge_cells(), wb_set_last_modified_by(), wb_set_row_heights(), wb_workbook()

Examples

Run this code
## Create a new workbook and add a worksheet
wb <- wb_workbook("Creator of workbook")
wb$add_worksheet(sheet = "My first worksheet")

## Save workbook to working directory
# \donttest{
wb_save(wb, file = temp_xlsx(), overwrite = TRUE)
# }

Run the code above in your browser using DataLab