Remove a worksheet from a Workbook object
Remove a worksheet from a workbook
removeWorksheet(wb, sheet)
## load a workbook
wb <- loadWorkbook(file = system.file("extdata", "loadExample.xlsx", package = "openxlsx"))
## Remove sheet 2
removeWorksheet(wb, 2)
## save the modified workbook
if (FALSE) { # \dontrun{
saveWorkbook(wb, "removeWorksheetExample.xlsx", overwrite = TRUE)
} # }