getLastRow-methods | R Documentation |
Queries the last (non-empty) row on a worksheet.
## S4 method for signature 'workbook,character'
getLastRow(object,sheet)
## S4 method for signature 'workbook,numeric'
getLastRow(object,sheet)
object |
The |
sheet |
The name or index of the sheet of which to query the last row |
Returns the numeric index of the last non-empty row in the specified worksheet.
Martin Studer
Mirai Solutions GmbH https://mirai-solutions.ch
workbook
## 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 the last row of the 'mtcars' worksheet
getLastRow(wb, "mtcars")
# Query the last row of the 'mtcars2' worksheet
getLastRow(wb, "mtcars2")
# Query the last row of the 'mtcars3' worksheet
getLastRow(wb, "mtcars3")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.