renameSheet-methods

0th

Percentile

Renaming worksheets from workbooks

Renames a worksheet from a '>workbook.

Keywords
methods, utilities
Usage
# S4 method for workbook,character
renameSheet(object,sheet,newName)
# S4 method for workbook,numeric
renameSheet(object,sheet,newName)
Arguments
object

The '>workbook to use

sheet

The name or index of the sheet to rename

newName

The new name of the sheet

Note

Note that renaming worksheets may result in invalid name references.

See Also

'>workbook, createSheet, existsSheet, getSheets, removeSheet, cloneSheet, setActiveSheet

Aliases
  • renameSheet
  • renameSheet-methods
  • renameSheet,workbook,character-method
  • renameSheet,workbook,numeric-method
Examples
# NOT RUN {
# mtcars xlsx file from demoFiles subfolder of package XLConnect
mtcarsFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")

# Load workbook
wb <- loadWorkbook(mtcarsFile)

# Rename the worksheet called 'mtcars' from the above file to 'MyCars'
renameSheet(wb, sheet = "mtcars", newName = "MyCars")
# }
Documentation reproduced from package XLConnect, version 0.2-14, License: GPL-3

Community examples

Looks like there are no examples yet.