 | WorksheetGetLastDataColumnNumber Method |
Gets the last existing column number with data in the current worksheet (zero-based)
Namespace: NanoXLSXAssembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.3+98f265239ae8df4639650ecd7029244cc5e52dfc
Syntaxpublic int GetLastDataColumnNumber()
Return Value
Int32Zero-based column number. in case of an empty worksheet, -1 will be returned
RemarksGetLastDataColumnNumber() will ignore formatted (or with the definition of AutoFilter, column width or hidden state) but empty cells after the last column with data.
If you want the last defined column, use
GetLastColumnNumber instead.
See Also