Solve Error Using XLSREAD

조회 수: 104 (최근 30일)
Joe-Philipp Kohnert
Joe-Philipp Kohnert 2018년 1월 19일
답변: Pooja Lalan 2018년 1월 22일
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

답변 (1개)

Pooja Lalan
Pooja Lalan 2018년 1월 22일
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.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by