Cannot read xls files

9 ビュー (過去 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 Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by