Learn R Programming

openxlsx (version 4.1.0)

sheetVisible: Get worksheet visible state.

Description

DEPRECATED - Use function 'sheetVisibility()

Usage

sheetVisible(wb)

sheetVisible(wb) <- value

Arguments

wb

A workbook object

value

a logical vector the same length as sheetVisible(wb)

Value

Character vector of worksheet names.

TRUE if sheet is visible, FALSE if sheet is hidden

Examples

Run this code
# NOT RUN {
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