MATLAB Answers

Anna
0

Sporadic error using xlsread

Asked by Anna
on 21 Mar 2014
Latest activity Commented on by Anna
on 22 Mar 2014

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 Comments

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
on 22 Mar 2014

In some cases I am calling the same file multiple times and it will crash on the second call but not the first. Other times it crashes the first time I call a file but when I rerun my code it opens the file fine.

Tags

Products

No products are associated with this question.

1 Answer

Answer by Image Analyst
on 22 Mar 2014

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.


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!