Learn R Programming

openxlsx2 (version 0.7)

wb_remove_worksheet: Remove a worksheet from a workbook

Description

Remove a worksheet from a Workbook object

Remove a worksheet from a workbook

Usage

wb_remove_worksheet(wb, sheet = current_sheet())

Arguments

wb

A workbook object

sheet

A name or index of a worksheet

Examples

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

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

Run the code above in your browser using DataLab