xlswrite output size limit

Good afternoon, MATLAB community. This is an obscure question, but does anyone know what the maximum file size that can be written to Excel using xlswrite?
I have a 14183x2416 cell array (has to be a cell array since there are a combination of characters and numbers), and when I 'whos' the variable name, I find it to be 4.1 GB. I've poured through all the literature I could find regarding writing to Excel from MATLAB, but everything I see talks about the actual cell/matrix size limitation, and from what I can tell, mine is well below that limit. The error I get is:
Error: Not enough storage is available to complete this operation.
I'm using a fairly high-end computer, so I can't imagine it's a hardware issue. To investigate the issue further, I chopped off about 1400 columns and the resulting cell was about 1.7 GB, which wrote to Excel with ease. At this point, the only thing I can think of is to break the big file up into two (or more) smaller files, but there's a way to keep everything in one Excel file, that would be the desired outcome.
The Excel version I'm using is 2010 (corrected; used to say 2016) and the MATLAB version is 2016b if that helps.
Thanks for your time!

10 Comments

Can we have the complete error message? Everything in read. It is important to know if the error is issued by matlab or by excel.
My apologies. Here's the full error:
Error using xlswrite (line 219)
Error: Not enough storage is available to complete this operation.
It might be a stupid comment but have you checked is there enough space on the disk that you are trying to save the excel to?
Jeremy
Jeremy on 18 Jul 2018
Edited: Jeremy on 18 Jul 2018
When it comes to me and computers, there are no stupid comments, as I'm kind of dumb when it comes to this stuff. Unless I'm looking in the wrong place, I have 522 GB of HD space available. Not sure how I would check memory usage outside of the Task Manager, which says 63.9 GB.
Honestly, I assumed it's the 64 GB version; however, I never actually verified. I'll do so now. Good catch!
How much memory do you have in total? This problem sounds like a problem that, at some point, either the memory or the disk is running out. Given the fact that you have 522GB of HD space available, I could hardly imagine that running out of disk space is the case.
While I'm not sure what is really causing the problem, and based on the fact that you are trying to save a really large there might be a good workaround that you first save the big matrix using a for loop to loop into each rows of it and save it row by row to a csv file, and then open it in excel (which may takes a long time), and then save it as a excel file.
what is your MATLAB and Excel version?
Additionally, looks like the error is coming from Excel when it does not have enough memory. Assuming that you have a large enough memory to handle 4GB+ file sizes, check the task manager for memory usage and close any other programs / applications.
Walter Roberson
Walter Roberson on 18 Jul 2018
Edited: Walter Roberson on 18 Jul 2018
I would interpret that is "disk full".
Or on some Linux server systems, it could be the case that you are running into a ulimit

Sign in to comment.

Answers (1)

Jeremy
Jeremy on 18 Jul 2018
Figured out the issue thanks to OCDER. The version I'm using (Excel 2010) is the 32 bit version, which limits writing to 2 GB. Earlier, I checked the version and it said 64 bit, which is partially why I was so confused. However, never discount the possibility that I'm an idiot, so I checked my home computer instead of the virtual machine I'm using. The VM's version of Excel is the 32 bit version, which accounts for the issue.
Thank you all very much for the help!

Products

Release

R2016b

Tags

Asked:

on 18 Jul 2018

Edited:

on 18 Jul 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!