Learn R Programming

openxlsx2 (version 1.4)

wb_remove_worksheet: Remove a worksheet from a workbook

Description

Remove a worksheet from a workbook

Usage

wb_remove_worksheet(wb, sheet = current_sheet())

Value

The wbWorkbook object, invisibly.

Arguments

wb

A wbWorkbook object

sheet

The sheet name or index to remove

Examples

Run this code
## load a workbook
wb <- wb_load(file = system.file("extdata", "openxlsx2_example.xlsx", package = "openxlsx2"))

## Remove sheet 2
wb <- wb_remove_worksheet(wb, 2)

Run the code above in your browser using DataLab