cloneSheet-methods

0th

Percentile

Cloning/copying worksheets

Clones (copies) a worksheet in a '>workbook.

Keywords
methods, utilities
Usage
# S4 method for workbook,numeric
cloneSheet(object,sheet,name)
# S4 method for workbook,character
cloneSheet(object,sheet,name)
Arguments
object

The '>workbook to use

sheet

The name or index of the worksheet to clone

name

The name to assign to the cloned worksheet. Throws an exception if the name to assign is the name of an already existing worksheet.

See Also

'>workbook, createSheet, removeSheet, renameSheet, getSheets, existsSheet

Aliases
  • cloneSheet
  • cloneSheet-methods
  • cloneSheet,workbook,character-method
  • cloneSheet,workbook,numeric-method
Examples
# NOT RUN {
# mtcars xlsx file from demoFiles subfolder of package XLConnect
demoExcelFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")

# Load workbook
wb <- loadWorkbook(demoExcelFile)

# Clone the 'mtcars' worksheet and assign it the name 'mtcars cloned'
cloneSheet(wb, sheet = "mtcars", name = "mtcars cloned")
# }
Documentation reproduced from package XLConnect, version 0.2-15, License: GPL-3

Community examples

Looks like there are no examples yet.