cloneSheet-methods | R Documentation |
Clones (copies) a worksheet in a workbook
.
## S4 method for signature 'workbook,numeric'
cloneSheet(object,sheet,name)
## S4 method for signature 'workbook,character'
cloneSheet(object,sheet,name)
object |
The |
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. |
If any worksheet-scoped named ranges are present on the original sheet
, these named ranges will not be present on the cloned worksheet.
Martin Studer
Mirai Solutions GmbH https://mirai-solutions.ch
workbook
, createSheet
,
removeSheet
, renameSheet
,
getSheets
, existsSheet
## 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.