Click or drag to resize
NanoXLSX

WorksheetGetLastRowNumber Method

Gets the last existing row number in the current worksheet (zero-based)

Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.5+4f4b44a718a20dda8ca2c0c4d00bd7eee7c80f5d
Syntax
C#
public int GetLastRowNumber()

Return Value

Int32
Zero-based row number. In case of an empty worksheet, -1 will be returned
Remarks
GetLastRowNumber() will not return the last row with data in any case. If there is a formatted (or with the definition of row height or hidden state) but empty cell (or many) after the last cell with data, GetLastRowNumber() will return the row number of this empty cell. Use GetLastDataRowNumber in this case.
See Also