Learn R Programming

openxlsx (version 4.2.6.1)

sheets: Returns names of worksheets.

Description

DEPRECATED. Use names().

Usage

sheets(wb)

Value

Name of worksheet(s) for a given index

Arguments

wb

A workbook object

Author

Alexander Walker

Details

DEPRECATED. Use names()

See Also

names() to rename a worksheet in a Workbook

Examples

Run this code

## Create a new workbook
wb <- createWorkbook()

## Add some worksheets
addWorksheet(wb, "Worksheet Name")
addWorksheet(wb, "This is worksheet 2")
addWorksheet(wb, "The third worksheet")

## Return names of sheets, can not be used for assignment.
names(wb)
# openXL(wb)

names(wb) <- c("A", "B", "C")
names(wb)
# openXL(wb)

Run the code above in your browser using DataLab