getSheetPos-methods | R Documentation |
Queries the position of a worksheet in a workbook
.
## S4 method for signature 'workbook,character'
getSheetPos(object,sheet)
object |
The |
sheet |
The name of the worksheet ( |
Returns the position index of the corresponding worksheet. Note that querying a non-existing worksheet results in a 0 index and does not throw an exception!
Martin Studer
Mirai Solutions GmbH https://mirai-solutions.ch
workbook
, setSheetPos
,
getSheets
## Not run:
# mtcars xlsx file from demoFiles subfolder of package XLConnect
demoExcelFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")
# Load workbook
wb <- loadWorkbook(demoExcelFile)
# Query worksheet positions for the worksheets 'mtcars2', 'mtcars3',
# 'mtcars' and 'NotThere' (which actually does not exist)
print(getSheetPos(wb, sheet = c("mtcars2", "mtcars3", "mtcars", "NotThere")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.