Skip to content
Julian Halliwell edited this page Sep 20, 2021 · 2 revisions

Returns the number of rows in the currently active or specified sheet, including any blank rows. Alias for getLastRowNumber().

getRowCount( workbook [, sheetNameOrNumber ] )

Required arguments

  • workbook spreadsheet object

Optional arguments

  • 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.

Example

spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
spreadsheet.addRow( workbook, "A1" );
spreadsheet.addRow( workbook, "B1" );
spreadsheet.addRow( workbook, "C1" );
numberOfRows = spreadsheet.getRowCount( workbook );//returns 3;
Clone this wiki locally