getLastColumn-methods
From XLConnect v1.0.1
by Martin Studer
Querying the last (non-empty) column on a worksheet
Queries the last (non-empty) column on a worksheet.
Usage
# S4 method for workbook,character
getLastColumn(object,sheet)
# S4 method for workbook,numeric
getLastColumn(object,sheet)
Arguments
Details
Returns the (1-based) numeric index of the last non-empty column in the specified worksheet.
See Also
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)
# Query the last row of the 'mtcars' worksheet
getLastColumn(wb, "mtcars")
# Query the last row of the 'mtcars2' worksheet
getLastColumn(wb, "mtcars2")
# Query the last row of the 'mtcars3' worksheet
getLastColumn(wb, "mtcars3")
# }
Community examples
Looks like there are no examples yet.