xl.sheet.add {excel.link} | R Documentation |
Basic operations with worksheets.
xl.sheet.add(xl.sheet.name = NULL, before = NULL) xl.sheet.duplicate(before = NULL) xl.sheet.name(xl.sheet.name = NULL) xl.sheet.visible(xl.sheet) xl.sheet.hide(xl.sheet = NULL) xl.sheet.show(xl.sheet) xl.sheets() xl.sheet.activate(xl.sheet) xl.sheet.delete(xl.sheet = NULL)
xl.sheet.name |
character. sheet name/new sheet name |
before |
character/numeric. sheet name or sheet number in active workbook before which new sheet will be added |
xl.sheet |
character/numeric. sheet name or sheet number in active workbook |
xl.sheet.add
adds new sheet with given name and invisibly
returns name of this newly added sheet. Added sheet become active. If
xl.sheet.name
is missing default name will be used. If before
argument is missing, sheet will be added at the last position. If sheet with
given name already exists error will be generated.
xl.sheet.name
rename active sheet. If its argument is missing
then it just return active sheet name.
xl.sheet.hide
/xl.sheet.show
hide and show sheet by its
name. xl.sheet.visible
returns current visibility status of the
sheet.
xl.sheet.activate
activates sheet with given name/number. If
sheet with this name doesn't exist error will be generated.
xl.sheet.delete
deletes sheet with given
name/number. If name doesn't submitted it delete active sheet.
xl.sheet.add
/xl.sheet.activate
/xl.sheet.duplicate
invisibly return name of created/activated/duplicated sheet.
xl.sheets
returns vector of sheet names in active workbook.
xl.sheet.delete
invisibly returns NULL.
## Not run: xl.workbook.add() sheets = xl.sheets() xl.sheet.add("Second") xl.sheet.add("First", before="Second") for (sheet in sheets) xl.sheet.delete(sheet) # only 'First' and 'Second' exist in workbook now xl.sheet.activate("Second") #last sheet activated xl.sheet.duplicate() # duplicate second sheet xl.sheet.name() # "Second (2)" xl.sheet.name("Third") # "Third" ## End(Not run)