"Error using xlsread, Worksheet 'Sheet1' not found. " I have this eror and I don't know why. I have the sheet and it's in the folder which I have my script and functions.

29 ビュー (過去 30 日間)
javad amoli
javad amoli 2018 年 2 月 8 日
移動済み: Fangjun Jiang 2024 年 7 月 22 日
I attached the eror in Png
Error using xlsread (line 247) Worksheet 'Sheet1' not found.
Error in load_the_prediction_data (line 15) [~,Times]=xlsread(['dee1_' char(Current_time_stamp) '.xlsx'],'Sheet1','A:A');
  3 件のコメント
杨
2024 年 7 月 22 日
移動済み: Fangjun Jiang 2024 年 7 月 22 日
The same to me,how the author solve this problem?
I have tried to read the <ExcelFileName> separately, and it was OK.
This indicates that the <ExcelFileName - sheet1> in this folder can be read, but it cannot be successfully read when <main .m> file is running.

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

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2018 年 2 月 8 日
You have the Excel file in that folder but do you have a sheet named "Sheet1" in that Excel file?
  8 件のコメント
Walter Roberson
Walter Roberson 2018 年 2 月 9 日
At the command line command
dbstop if error
and run the program. When it stops, use the command dbup as many times as needed until it tells you that you are in the workspace of load_the_prediction_data
At that point run the xlsinfo command I showed.
Fangjun Jiang
Fangjun Jiang 2018 年 2 月 9 日
Your showed dee1.xlsx but your code was looking for dee1_***.xlsx. So it is not the right file.
Just locate that file, run xlsread(ExcelFileName,'Sheet1','A:A') to see what happens. This command will run without error, return an empty array with just a new dummy empty Excel file.

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

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by