Error using xlsread. Worksheet not found

33 ビュー (過去 30 日間)
Maaz Ahmad
Maaz Ahmad 2019 年 11 月 12 日
コメント済み: Maaz Ahmad 2019 年 11 月 12 日
Warning: Could not start Excel server for import, 'basic' mode will be used. Refer to HELP XLSREAD for more information.
> In xlsread (line 195)
In realdata (line 59)
Error using xlsread (line 257)
Worksheet 'Sheet2' not found.
Error in realdata (line 59)
On_Fl_stg1 = xlsread ('write.xlsx','Sheet2','A2:A4027');
Can someone please help me with this. I am using MATLAB 2019a, and it is unable to read my excel data from 'Sheet2' (the name of worksheet).
However, when I change the name in excel and accordingly in MATLAB code, it works for the 1st time but then again gives the same error on multiple runs.

採用された回答

Walter Roberson
Walter Roberson 2019 年 11 月 12 日
編集済み: Walter Roberson 2019 年 11 月 12 日
Warning: Could not start Excel server for import, 'basic' mode will be used. Refer to HELP XLSREAD for more information.
xlsread can only read .xlsx files on MS Windows systems that have Excel installed. On MS Windows systems that do not have Excel installed, and on Mac and Linux systems, xlsread() can only read .csv files.
It is recommended that you use readtable() [R2013b or newer] or readmatrix() [if you have R2019b or newer]
  1 件のコメント
Maaz Ahmad
Maaz Ahmad 2019 年 11 月 12 日
Thanks a lot Walter! This was helpful.
readmatrix() is working good for me.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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