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 and 10.

  • $\begingroup$ 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. $\endgroup$ – s0rce Mar 8 '13 at 18:00
  • 1
    $\begingroup$ 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/… $\endgroup$ – Ajasja Mar 8 '13 at 18:08
  • 1
    $\begingroup$ Should we tag as bug? $\endgroup$ – Ajasja Mar 8 '13 at 22:51
  • 1
    $\begingroup$ @SjoerdC.deVries Excel has enough bugs to claim compatibility with any other buggy software $\endgroup$ – Dr. belisarius Mar 8 '13 at 23:53
  • 10
    $\begingroup$ @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. $\endgroup$ – Ajasja Mar 9 '13 at 16:05

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.

  • $\begingroup$ Yes, the support answer is not useful at all. Looks like the Wolfram developers are still very busy with fully supporting XLSX, since in 10.0.1 it seems not to work (at least on Windows). $\endgroup$ – Rolf Mertig Oct 15 '14 at 11:19

According to


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:


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

  • 3
    $\begingroup$ Actually 2003 does not natively support xlsx files, the file format we are talking about. $\endgroup$ – Ajasja Mar 9 '13 at 16:01
  • 6
    $\begingroup$ 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. $\endgroup$ – Oleksandr R. Mar 9 '13 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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