-
-
Notifications
You must be signed in to change notification settings - Fork 36
getLastRowNumber
Julian Halliwell edited this page Sep 20, 2021
·
1 revision
Returns the number of the last row in the currently active or specified sheet, including any blank rows.
getLastRowNumber( workbook [, sheetNameOrNumber ] )
-
workbook
spreadsheet object
-
sheetNameOrNumber
string OR numeric: the name or number of the sheet within the workbook to operate on. If you omit this argument, the currently active sheet will be used.
Chainable? Yes but ends the chain.
spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
spreadsheet.addRow( workbook, "A1" );
spreadsheet.addRow( workbook, "B1" );
spreadsheet.addRow( workbook, "C1" );
numberOfRows = spreadsheet.getLastRowNumber( workbook );//returns 3;