Skip to main content

Get number of rows

Count the rows that hold data, or all rows of the used area, and report the number of the last used row.

Command in the Excel toolkit · id ooa.excel/row_count · 4 inputs, 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
SheetStringNoSheet name; active sheet when empty.
SessionStringNoexcelWorkbook session.
ModeStringNonon_emptynon_empty counts rows holding data; all counts every row from the first to the last used row, empty ones included.
IndexNumberNo1-based sheet position, used instead of the name.

Outputs​

OutputTypeWhat it is
countNumberRows with at least one non-empty cell, or all rows of the used area.
last_rowNumber1-based number of the last row with data; 0 when the sheet is empty.