setActiveSheet-methods.Rd
Sets the active worksheet of a workbook
.
# S4 method for class 'workbook,character'
setActiveSheet(object,sheet)
# S4 method for class 'workbook,numeric'
setActiveSheet(object,sheet)
The workbook
to use
The name or index of the sheet to activate
The active worksheet of a workbook
is the worksheet that is displayed
when the corresponding Excel file is opened.
if (FALSE) { # \dontrun{
# mtcars xlsx file from demoFiles subfolder of package XLConnect
mtcarsFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")
# Load workbook
wb <- loadWorkbook(mtcarsFile)
# Sets the active sheet to the sheet 'mtcars3'
setActiveSheet(wb, sheet = "mtcars3")
} # }