Learn R Programming

openxlsx (version 4.1.0)

saveWorkbook: save Workbook to file

Description

save a Workbook object to file

Usage

saveWorkbook(wb, file, overwrite = FALSE)

Arguments

wb

A Workbook object to write to file

file

A character string naming an xlsx file

overwrite

If TRUE, overwrite any existing file.

See Also

createWorkbook

addWorksheet

loadWorkbook

writeData

writeDataTable

Examples

Run this code
# NOT RUN {
## Create a new workbook and add a worksheet
wb <- createWorkbook("Creator of workbook")
addWorksheet(wb, sheetName = "My first worksheet")

## Save workbook to working directory
saveWorkbook(wb, file = "saveWorkbookExample.xlsx", overwrite = TRUE) 
# }

Run the code above in your browser using DataLab