sheetVisibility: Get/set worksheet visible state

View source: R/wrappers.R

sheetVisibilityR Documentation

Get/set worksheet visible state

Description

Get and set worksheet visible state

Usage

sheetVisibility(wb)

sheetVisibility(wb) <- value

Arguments

wb

A workbook object

value

a logical/character vector the same length as sheetVisibility(wb)

Value

Character vector of worksheet names.

Vector of "hidden", "visible", "veryHidden"

Examples


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

sheetVisibility(wb)
sheetVisibility(wb)[1] <- TRUE ## show sheet 1
sheetVisibility(wb)[2] <- FALSE ## hide sheet 2
sheetVisibility(wb)[3] <- "hidden" ## hide sheet 3
sheetVisibility(wb)[3] <- "veryHidden" ## hide sheet 3 from UI

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