Rename a worksheet
renameWorksheet(wb, sheet, newName)
DEPRECATED. Use names()
## Create a new workbook
wb <- createWorkbook("CREATOR")
## Add 3 worksheets
addWorksheet(wb, "Worksheet Name")
addWorksheet(wb, "This is worksheet 2")
addWorksheet(wb, "Not the best name")
#' ## rename all worksheets
names(wb) <- c("A", "B", "C")
## Rename worksheet 1 & 3
renameWorksheet(wb, 1, "New name for sheet 1")
names(wb)[[1]] <- "New name for sheet 1"
names(wb)[[3]] <- "A better name"
## Save workbook
if (FALSE) { # \dontrun{
saveWorkbook(wb, "renameWorksheetExample.xlsx", overwrite = TRUE)
} # }