Cannot read xls files

조회 수: 12 (최근 30일)
Cécile Moulin
Cécile Moulin 2016년 12월 12일
댓글: Image Analyst 2016년 12월 13일
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
Image Analyst
Image Analyst 2016년 12월 13일
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???

댓글을 달려면 로그인하십시오.

답변 (3개)

Image Analyst
Image Analyst 2016년 12월 12일
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.
  댓글 수: 1
Cécile Moulin
Cécile Moulin 2016년 12월 12일
Oups sorry. done

댓글을 달려면 로그인하십시오.


Isabella Osetinsky-Tzidaki
Isabella Osetinsky-Tzidaki 2016년 12월 12일
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

Cécile Moulin
Cécile Moulin 2016년 12월 13일
편집: Cécile Moulin 2016년 12월 13일
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 ?

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by