removeSheet-methods
From XLConnect v1.0.1
by Martin Studer
Removing worksheets from workbooks
Usage
# S4 method for workbook,character
removeSheet(object,sheet)
# S4 method for workbook,numeric
removeSheet(object,sheet)
Arguments
Note
When removing a worksheet that is the currently active sheet then XLConnect resets
the active sheet to the first possible worksheet in the '>workbook
.
Also note that deleting worksheets may result in invalid name references.
See Also
'>workbook
, createSheet
,
existsSheet
, getSheets
,
renameSheet
, cloneSheet
,
setActiveSheet
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)
# Remove the worksheet called 'mtcars' from the above file
removeSheet(wb, sheet = "mtcars")
# }
Community examples
Looks like there are no examples yet.