Find the Maximum Rows and Columns Supported by XLS and XLSX Formats with Go via C++

Possible Usage Scenarios

Excel formats support different numbers of rows and columns. For example, XLS supports 65,536 rows and 256 columns, while XLSX supports 1,048,576 rows and 16,384 columns. If you want to know how many rows and columns are supported by a given format, you can use GetMaxRow() and GetMaxColumn() properties.

Find Maximum Rows and Columns Supported by XLS and XLSX Formats

The following sample code creates a workbook first in XLS format and then in XLSX format. After creation, it prints the values of the GetMaxRow() and GetMaxColumn() properties. Please see the console output provided below for your reference.

Sample Code

Console Output

Maximum rows and columns supported by XLS format.

Maximum Rows: 65536

Maximum Columns: 256

Maximum rows and columns supported by XLSX format.

Maximum Rows: 1048576

Maximum Columns: 16384