Click or drag to resize
NanoXLSX

WorksheetGetLastDataRowNumber Method

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

Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.7+b0ed5f8a99a50b9e6528224889fbd7f23c30b364
Syntax
C#
public int GetLastDataRowNumber()

Return Value

Int32
Zero-based row number. in case of an empty worksheet, -1 will be returned
Remarks
GetLastDataColumnNumber() will ignore formatted (or with the definition of row height or hidden state) but empty cells after the last column with data. If you want the last defined column, use GetLastRowNumber instead.
See Also