How to fix this error "Not enough storage is available to complete this operation"?

Hi Everyone,
Could you please help me how to overcome this error?
Error: Not enough storage is available to complete this operation.
Error in ==> xlsread at 325
rawData = DataRange.Value;
Thanks!

9 Comments

Sounds like an out of memory either on the excel side or in the amount of data which is allowed to be transfered through COM. How big is the excel file you try to read? What is the range you want to read(so A1 to??)?
Matlab supposed to plot a map for two stations during five months (5 months per each station). Each day contain an excel file is about 5.85MB, A1-AB1 and each column is about 13354.
At least that size works for me. Can you try this:
>> xlswrite('test.xlsx',reshape(1:28*13354,[],28))
>> a = xlsread('test.xlsx');
What extension does your excel file have? What happens when you try to read a smaller range?
@Ara: Please post the command, which causes the problem.
Sorry, if my explanation wasn't clear enough. It means I have to change all of the excel like the code you sent? If yes, I should have said the each excel file is different in terms of size and row but the column are equal(all have 28 column).
@Jan: It seems Matlab could not able to read the other excels anymore. This is that you want me to post??
Warning: Could not start Excel server for export.
XLSWRITE will attempt to write file in CSV format.
> In xlswrite at 166
??? Undefined function or variable "ExcelWorkbook".
Error in ==> xlsread at 260
format = ExcelWorkbook.FileFormat;
@Ara, I think Friedrich just wants you to try those two lines of code. That code will create an Excel file which is the same size as yours, and then try to read it back again. He wants to see if that works.
Thanks to explain me. I tried and those lines gave me an empty excel file but still Matlab can not run to read the rest of the operations and again give me the above error.
@Ara: No, I asked for the line of code you use to call XLSWRITE. But the posted error message is revealing, that there is a problem with the Excel server. Which Excel version do you have installed?
@Jan: I did not call XLSWRITE in my code and I think this is the main problem that Matlab shows "not enough storage". I guess I have to write a new function and then call the other process, right? Btw, the Excel 2010 I am using.
@ Friedrich: It's ok to process all the data for 4 months but when exactly it start to read files from the fifth month then the error display.
Please let me know your suggestions?

Sign in to comment.

Answers (1)

This issue is a known bug in MATLAB and has been addressed in the following bug report:
The bug report has a workaround which you can install for MATLAB R2013a through R2014b.

2 Comments

I am facing a similar problem when I run a Simulink model in Acceleration mode. However, the problem does not surface when I use the Normal mode. I am using MATLAB 2018a. Is there any fix for this?
I am having the same problem with MATLAB 2020b. Will this ever be fixed?

Sign in to comment.

Tags

Asked:

Ara
on 11 Apr 2013

Commented:

on 2 Dec 2020

Community Treasure Hunt

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

Start Hunting!