Save a workboook object to file while filling file name from assigned workbook title
Source:R/wb_save.R
wb_save_ext.Rd
wb_save_ext()
is a helper function extending openxlsx2::wb_save()
by
filling a missing file name with the workbook title and validating the file
extension. This function is not stable and may change in the future.
Arguments
- wb
A
wbWorkbook
object to write to file- file
A path to save the workbook to
- overwrite
If
FALSE
, will not overwrite whenfile
already exists.- ...
Arguments passed on to
openxlsx2::wb_save
path
Deprecated argument. Please use
file
in new code.
Examples
withr::with_tempdir({
wb <- wb_new_workbook(
title = "Title used for output file",
sheet_name = "Sheet 1"
)
wb_save_ext(wb)
fs::dir_ls()
})
#> Title used for output file.xlsx