matlab excel, import data excel is fail
8 次查看(过去 30 天)
显示 更早的评论
i import my data into matlab but fail. Matlab noticed that: "coul not open the spreadsheet. matlab reported the following error: Unreadable excel file: no public fielddisplay alert exists for class COM.excel_application
回答(2 个)
Image Analyst
2014-6-3
You probably have some code like this from my demo that I have posted many times:
% If your user has your Excel file already open,
% this code saves & closes the file, then closes excel:
Excel = actxGetRunningServer('Excel.Application');
Excel.DisplayAlerts = false; % Avoid excel warning popups
Excel.WorkBooks.Item('Filename.xls').Save;
Excel.WorkBooks.Item('Filename.xls').Close;
Excel.Quit;
I think the DisplayAlerts property was only introduced recently (Office 2007 or 2010 - I don't remember). You may have a version of Excel prior to when that property was introduced. Just delete that line from your code.
3 个评论
Image Analyst
2014-6-4
- Type ctrl-f.
- Paste in "Excel.DisplayAlerts" and
- click Find Next.
- Place the cursor to the left margin until the arrow points to the right.
- Click to highlight the entire line.
- Type the delete key to delete that line..
- Type F5 to run your code and test it.
sara
2015-1-28
Try to "run MATLAB as administrator". This might solve the problem. Probably MATLAB does not have access to the files...
sara
2015-1-28
Try to "run MATLAB as administrator". This might solve the problem. Probably MATLAB does not have access to the files...
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!