Learn R Programming

openxlsx (version 4.2.7.1)

copyWorkbook: Copy a Workbook object.

Description

Just a wrapper of wb$copy()

Usage

copyWorkbook(wb)

Value

Workbook

Arguments

wb

A workbook object

Examples

Run this code

wb <- createWorkbook()
wb2 <- wb ## does not create a copy
wb3 <- copyWorkbook(wb) ## wrapper for wb$copy()

addWorksheet(wb, "Sheet1") ## adds worksheet to both wb and wb2 but not wb3

names(wb)
names(wb2)
names(wb3)

Run the code above in your browser using DataLab