problem with xlswrite while obeying excel limits
3 views (last 30 days)
I know that there are a lot of posts on this subject but I have searched them extensively and still can't figure out why I am getting this error.
[statusD,msginfoD] = xlswrite([NewName '.xls'],DataForExport,2);
the variable DataForExport is a cell array that contains 60001 rows and 12 columns, every cell contains ether a numeric value or a string and none of the strings are longer than the limited 991 charaters (actually the longest is 50). Yet I still get the error;
message: 'Error: Object returned error code: 0x800A03EC'
I don't get the error if I write only the first 6 columns of data but the second 6 columns of data can not be written serially and the error is thrown again.
Oleg Komarov on 9 Dec 2015
Edited: Oleg Komarov on 9 Dec 2015
I had the following error:
and it boiled down to having a column with incorrect excel formulas in my cell array, like:
'=HYPERLINK("file:///myfolder/"& filename &".pdf")'
where it should have been
The erroneous formula generates an "Invalid Name Error" if pasted to excel.