activeSheet: Get/set active sheet of the workbook

View source: R/wrappers.R

activeSheetR Documentation

Get/set active sheet of the workbook

Description

Get and set active sheet of the workbook

Usage

activeSheet(wb)

activeSheet(wb) <- value

Arguments

wb

A workbook object

value

index of the active sheet or name of the active sheet

Value

return the active sheet of the workbook

Author(s)

Philipp Schauberger

Examples


wb <- createWorkbook()
addWorksheet(wb, sheetName = "S1")
addWorksheet(wb, sheetName = "S2")
addWorksheet(wb, sheetName = "S3")

activeSheet(wb) # default value is the first sheet active
activeSheet(wb) <- 1 ## active sheet S1
activeSheet(wb)
activeSheet(wb) <- "S2" ## active sheet S2
activeSheet(wb)

openxlsx documentation built on Sept. 20, 2024, 5:08 p.m.