Solve Error Using XLSREAD

67 ビュー (過去 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 Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by