loadWorkbook | R Documentation |
loadWorkbook returns a workbook object conserving styles and formatting of the original .xlsx file.
loadWorkbook(file, xlsxFile = NULL, isUnzipped = FALSE, na.convert = TRUE)
file |
A path to an existing .xlsx or .xlsm file |
xlsxFile |
alias for file |
isUnzipped |
Set to TRUE if the xlsx file is already unzipped |
na.convert |
Should empty/blank cells be converted to |
Workbook object.
Alexander Walker, Philipp Schauberger
removeWorksheet()
## load existing workbook from package folder
wb <- loadWorkbook(file = system.file("extdata", "loadExample.xlsx", package = "openxlsx"))
names(wb) # list worksheets
wb ## view object
## Add a worksheet
addWorksheet(wb, "A new worksheet")
## Save workbook
## Not run:
saveWorkbook(wb, "loadExample.xlsx", overwrite = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.