Sporadic error using xlsread
显示 更早的评论
I am having a problem using xlsread. I have code that I have been running for over a year and it suddenly is having issues. I have the following code to pull data in from an excel file:
lom_spill_llh = xlsread('LOM Spill Calculator v9_2014 LLH Final RC.xls','Summary','CO5:FP22')';
And I get the following error:
??? No appropriate method, property, or field FileFormat for class Interface.000208DB_0000_0000_C000_000000000046.Open.
Error in ==> xlsread at 252 format = ExcelWorkbook.FileFormat;
I have never had this problem before and it is a sporadic problem, I get it sometimes, but then when I rerun the code, it will work just fine. Any thoughts?
I am using Matlab 7.11.0(R2010b) I am using Microsoft Excel 2010 and the file is saved in 97-2003 format
Thanks
2 个评论
Joseph Cheng
2014-3-21
Quick question, are you processing the same file multiple times and sometimes getting this error? It was not clear in the question if the sporadic nature of the problem was on a specific file that doesn't change.
Anna
2014-3-22
回答(1 个)
Image Analyst
2014-3-22
0 个投票
Excel might have gotten rid of that method or property. "FileFormat" may no longer be included as part of Excel 2010. I had that happen once to some method or property I was using in ActiveX code.
1 个评论
Image Analyst
2014-3-22
See if you can find it listed here http://msdn.microsoft.com/en-us/library/Microsoft.Office.Interop.Excel%28v=office.14%29.aspx
类别
在 帮助中心 和 File Exchange 中查找有关 ActiveX 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!