removeWorksheet: Remove a worksheet from a workbook

Description Usage Arguments Author(s) Examples

View source: R/wrappers.R

Description

Remove a worksheet from a Workbook object

Remove a worksheet from a workbook

Usage

1
removeWorksheet(wb, sheet)

Arguments

wb

A workbook object

sheet

A name or index of a worksheet

Author(s)

Alexander Walker

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## load a workbook
wb <- loadWorkbook(file = system.file("extdata", "loadExample.xlsx", package = "openxlsx"))

## Remove sheet 2
removeWorksheet(wb, 2)

## save the modified workbook
## Not run: 
saveWorkbook(wb, "removeWorksheetExample.xlsx", overwrite = TRUE)

## End(Not run)

Example output



openxlsx documentation built on June 16, 2021, 9:06 a.m.