Error using xlsread 'No appropriate method, property, ...'
Mostrar comentarios más antiguos
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 comentarios
KSSV
el 25 de Ag. de 2016
Have you checked this with different xl files?
Walter Roberson
el 25 de Ag. de 2016
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
el 25 de Ag. de 2016
Walter Roberson
el 25 de Ag. de 2016
Are you using MS Windows, Linux, or OS-X ?
Walter Roberson
el 25 de Ag. de 2016
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
el 26 de Ag. de 2016
Guillaume
el 26 de Ag. de 2016
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
el 26 de Ag. de 2016
Guillaume
el 26 de Ag. de 2016
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.
Respuestas (1)
KSSV
el 25 de Ag. de 2016
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 comentario
Guillaume
el 25 de Ag. de 2016
The two different syntaxes are equally valid and will make absolutely no difference to what happens.
This certainly won't resolve any problem.
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!