Maximum rows constant?

is there a constant defined somewhere that will give me the maximum number of rows for a worksheet ie 65536 rows for an xls or 1048576 for an xlsx???

thanks!!!

Hi,

Well, generally, if the Excel file format is XLS, the maximum rows would be 65536 and if it is MS Excel 2007 format e.g XLSX, the maximum rows would be 1048576. We don’t have any public constant for the users but rows count depends on the file format type.

Moreover, to know about the farthest row index (zero-based) which contains data or style, you may try Cells.MaxDataRow/MaxRow APIs


Thank you.