MATLAB: Is the maximum number of columns in an Excel sheet stated to be 2^52 in the documentation for XLSWRITE in MATLAB 7.3 (R2006b)

documentationexcelMATLABxlswrite

The code of "xlswrite.m" contains the following text:
DEC2BASE27(D) returns the representation of D as a string in base 27,
expressed as 'A'..'Z', 'AA','AB'...'AZ', until 'IV'. Note, there is no zero
digit, so strictly we have hybrid base26, base27 number system. D must be
a negative integer bigger than 0 and smaller than 2^52, which is the
maximum number of columns in an Excel worksheet.
2^52 is not a typographical error because two more statements quote the
same value. I believe the the maximum number of columns in Excel is 256.

Best Answer

There is a limit in Microsoft Excel on the number of rows and columns an Excel file can contain. An Excel file may have upto 256 columns and 65536 rows. Since the data you are writing to the excel file has 1000 columns, Microsoft Excel errors out and MATLAB is unable to complete the XLSWRITE operation.The limitation in the new version of Excel is now 16k.
However, XLSWRITE does not limit itself to that, but will in fact work up to 2^52. This is to ensure that future increases in the maximum number of allowed rows are supported by XLSWRITE.