removeWorksheet: Remove a worksheet from a workbook

View source: R/wrappers.R

removeWorksheetR Documentation

Remove a worksheet from a workbook

Description

Remove a worksheet from a Workbook object

Remove a worksheet from a workbook

Usage

removeWorksheet(wb, sheet)

Arguments

wb

A workbook object

sheet

A name or index of a worksheet

Author(s)

Alexander Walker

Examples

## 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)

openxlsx documentation built on Sept. 20, 2024, 5:08 p.m.