Learn R Programming

openxlsx (version 4.1.0)

names: get or set worksheet names

Description

get or set worksheet names

Usage

# S3 method for Workbook
names(x)

# S3 method for Workbook names(x) <- value

Arguments

x

A Workbook object

value

a character vector the same length as wb

Examples

Run this code
# NOT RUN {
wb <- createWorkbook()
addWorksheet(wb, "S1")
addWorksheet(wb, "S2")
addWorksheet(wb, "S3")

names(wb)
names(wb)[[2]] <- "S2a"
names(wb)
names(wb) <- paste("Sheet", 1:3)
# }

Run the code above in your browser using DataLab