Learn R Programming

openxlsx (version 4.2.6.1)

sheetVisible: Get worksheet visible state.

Description

DEPRECATED - Use function 'sheetVisibility()

Usage

sheetVisible(wb)

sheetVisible(wb) <- value

Value

Character vector of worksheet names.

TRUE if sheet is visible, FALSE if sheet is hidden

Arguments

wb

A workbook object

value

a logical vector the same length as sheetVisible(wb)

Author

Alexander Walker

Examples

Run this code

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

sheetVisible(wb)
sheetVisible(wb)[1] <- TRUE ## show sheet 1
sheetVisible(wb)[2] <- FALSE ## hide sheet 2

Run the code above in your browser using DataLab