Cannot read xls files
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I'm trying to read a xls file with Matlab (2015b, used in the lab, on a host). I have the following error :
Error using xlsread (line 251)
XLSREAD unable to read sheet 'tab1'.
File could not be read by biffparse. Invalid record ID.
with the command :
xlsread('fichier_test.xls','tab1');
And when I try to write, I have :
Warning: Could not start Excel server for export.
XLSWRITE will attempt to write file in CSV format.
I'm quite lost... Thank you Ccile
Sorry for the mistakes.
EDIT
Hi,
I don't know if it's better to edit my post or to post an answer so I do both.
I think I found the reason of the error (in my case) : I had a " ' " in the file. I removed it and it was good ^^ Now I just need to check if it's good on the "Monday's Matlab" (I work in two labs...) (no more answer on Monday means it's good ^^)
Thanks for reading, sorry for the mistakes (do not hesitate to correct... by contact if you prefer)
Ccile
PS How do I close this question ?
1 commentaire
Image Analyst
le 13 Déc 2016
I don't think that a ' in any cell of Excel should cause xlsread() to throw an error. Is the xls file you attached the one with the ' in it or not? If so, exactly where is the ' -- in a cell, or a sheet name or where???
Réponses (3)
Image Analyst
le 12 Déc 2016
You forgot to attach xls_file.xls.
Failing that, about all I can suggest is to not use the 'tab1' argument, or try 'Sheet1' or whatever the worksheet is really called.
Isabella Osetinsky-Tzidaki
le 12 Déc 2016
see https://www.mathworks.com/matlabcentral/answers/100550-why-does-xlsread-return-errors-with-some-spreadsheets-on-non-windows-platforms-in-matlab-7-6-r2008a
0 commentaires
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!