R: get or set worksheet names

names {openxlsx} | R Documentation

## get or set worksheet names

### Description

get or set worksheet names

### Usage

    ## S3 method for class 'Workbook'
    names(x)

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

### Arguments

`x` | A `Workbook` object
`value` | a character vector the same length as wb

### Examples

    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)

[Package openxlsx version 4.2.4 Index]