removeWorksheet | R Documentation |
Remove a worksheet from a Workbook object
Remove a worksheet from a workbook
removeWorksheet(wb, sheet)
wb |
A workbook object |
sheet |
A name or index of a worksheet |
Alexander Walker
## load a workbook
wb <- loadWorkbook(file = system.file("extdata", "loadExample.xlsx", package = "openxlsx"))
## Remove sheet 2
removeWorksheet(wb, 2)
## save the modified workbook
## Not run:
saveWorkbook(wb, "removeWorksheetExample.xlsx", overwrite = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.