Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When I want to Export["text.xlsx", data] where data is a matrix with 500 columns and 10000 rows, I get the error message:

Export::toomany3: "Cannot export to !(\"XLSX\"). The number of columns exceeds the limit of this format."

However, if I write the data as csv and load it into excel, everything works. Is there a way to write the data of this size to xlsx directly?

Test sample:

data = RandomReal[{-1, 1}, {10000, 500}];
Export["test.xlsx", data]

This happens with Mathematica 8 and 9.

share|improve this question
    
Have you tried xls? Probably best to just use csv. If MMA can't export as xlsx then unless they patch it I don't think you can solve it. –  s0rce Mar 8 '13 at 18:00
1  
Are you sure the v9 tag is appropriate? This would suggest that it works in v8... Since xlsx is "just" an xml file you could in theory get around this. But definitely not worth the effort. Also, contact support@wolfram.com and report this as a bug. superuser.com/questions/366468/… –  Ajasja Mar 8 '13 at 18:08
1  
Should we tag as bug? –  Ajasja Mar 8 '13 at 22:51
1  
@SjoerdC.deVries Excel has enough bugs to claim compatibility with any other buggy software –  belisarius Mar 8 '13 at 23:53
4  
@AndreasLauschke I don't agree: the xlsx file format specification supports 1,048,576 rows and 16,384 columns. So in mma you either have to mention you don't fully support it, or fix the limits. Whether it is a good idea to export such large data to xlsx or not is beside the point. –  Ajasja Mar 9 '13 at 16:05
show 6 more comments

2 Answers

I wrote to Wolfram's support and they answered with a link about "Excel 2007 features that are not supported in earlier versions of Excel". I can not see clearly how this connects to Mathematica's support of Excel 2007 features. However, my suggestion to fully support XLSX has been forwarded to Wolfram's developers.

share|improve this answer
add comment

According to

http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx

this is no bug in MM. It is the spec limit of an Excel sheet. Thus you have to split your export. Maybe you want to rethink the data structure?

Edit: Applies to Excel 2003. For excel 2010 the limits were extended:

http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010342495.aspx?CTT=5&origin=HP005199291

Thus it is not exactly a bug. It is more a feature request since Wolfram should adopt to the new limits.

share|improve this answer
3  
Actually 2003 does not natively support xlsx files, the file format we are talking about. –  Ajasja Mar 9 '13 at 16:01
3  
Even if they don't wish to add support for more than 255 columns, the objection that "the number of columns exceeds the limit of this format" is clearly incorrect--thus I think calling it a bug is appropriate in this case. Limitations placed on other formats by Mathematica's capabilities rather than the format itself are clearly stated in the documentation, which obviously is not the case here. –  Oleksandr R. Mar 9 '13 at 20:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.