Solve Error Using XLSREAD
65 views (last 30 days)
Show older comments
Hey there,
I'm trying to read in an Excel file, which worked yesterday (and I don't remember changing any settings) This is the Error:
if true
% code
Error using xlsread (line 260)
Invoke Error, Dispatch Exception:
Source: Microsoft Excel
Description: Die Open-Methode des Workbooks-Objektes konnte nicht ausgeführt werden.
Help File: xlmain11.chm
Help Context ID: 0
end
I have tried the xlswrite command, same error occurs. I have changed the Dynamic Data Exchange settings in Excel, still no difference. Looking forward to hear from you Cheers Joe
0 Comments
Answers (1)
Pooja Lalan
on 22 Jan 2018
The error message is thrown because of the COM/ActiveX layer that is started by XLSREAD. In particular, Excel is not able to allocate enough memory when it attempts to copy large amounts of data for transfer into MATLAB, and MATLAB is re-throwing the error in the Command Window.
Please perform the following steps in order to eliminate the error:
1) This error may occur if a file with macros is saved in Excel 2003 and then used with Excel 2007 or Excel 2010. The issue may be resolved by first opening the file with Excel 2007 or 2010 and re-saving.
2) Place the Excel file in the local directory. If the file is on a shared network, it could be open in a program or in use by users. A possible workaround would be to change the location of the Excel workbook to a local directory from a mapped network drive.
3) Run the Disk Cleanup by navigating to Start, type "Disk Cleanup" and remove only the "Temporary files" by checking only that option.
0 Comments
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!