Error using xlsread 'No appropriate method, property, ...'
古いコメントを表示
Hi,
I have MATLAB R2015a and i want to read out a xls excel sheet with matlab. Every time I open it in my code i get this red Error:
_Error using xlsread (line 247)
No appropriate method, property, or field 'FileFormat' for class
'Interface.000208DA_0000_0000_C000_000000000046'._
I already created my own excel sheet but i receive the same error.
Yesterday everything worked fine. Don't why it stucks today.
10 件のコメント
KSSV
2016 年 8 月 25 日
Have you checked this with different xl files?
Walter Roberson
2016 年 8 月 25 日
Which operating system are you using?
I suspect you are going to need to command
dbstop if caught error
and run the xlsread again, and see where it ends up stopping. It might possibly be within xlsinfo
Christoph Thale
2016 年 8 月 25 日
Walter Roberson
2016 年 8 月 25 日
Are you using MS Windows, Linux, or OS-X ?
Walter Roberson
2016 年 8 月 25 日
The error is the xlsread(..)
No it is not. The error is being reported inside xlsread(), and the line number given there (247) is where xlsread() handles exceptions that have occurred in the code that it is calling. The actual error is in one of the routines that xlsread() is calling but at the moment we do not know which. If you give that command
dbstop if caught error
and run the program, then it will stop at some lower level routine that was called from xlsread where the error is being generated.
Interface.000208DA_0000_0000_C000_000000000046 is the _Workbook interface, which definitively has a FileFormat property.
Therefore, it is very puzzling that you get this error.
What happens when you open the same file directly in Excel?
Note that since you do have a workbook object, matlab managed to open the file.
Also, what is the extension of the file?
Christoph Thale
2016 年 8 月 26 日
Guillaume
2016 年 8 月 26 日
If you can attach the offending file (assuming it's not confidential) we could try to analyse what is happening.
If the information is confidential, you could replace it with dummy data. I doubt the actual content of the sheet matters for this problem.
Christoph Thale
2016 年 8 月 26 日
Guillaume
2016 年 8 月 26 日
If the file is in xls format, the password protection is easy to bypass/remove. What I want to look at is the file structure, so the fact that the macros are password protected shouldn't matter.
回答 (1 件)
KSSV
2016 年 8 月 25 日
I guess problem is with loop... Instead of [num,txt,Messwerte{i}] = xlsread(Pfad,3); use as below
[num,txt,Messwerte1] = xlsread(Pfad,3);
Messwerte{i} = Messwerte1 ;
1 件のコメント
Guillaume
2016 年 8 月 25 日
The two different syntaxes are equally valid and will make absolutely no difference to what happens.
This certainly won't resolve any problem.
カテゴリ
ヘルプ センター および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!