Unable to read excel file

2 views (last 30 days)
Joel
Joel on 6 Apr 2023
Commented: Joel on 6 Apr 2023
Hi
I'm unable to read this excel file. I tried restarting my computer, but it does not work.
Anybody knows what the issue could be?
readtable(SMHI2.xlsx);
Unable to resolve the name 'SMHI2.xlsx'.
  2 Comments
Stephen23
Stephen23 on 6 Apr 2023
"Anybody knows what the issue could be?"
readtable('SMHI2.xlsx')
% ^ ^ missing quotation characters
Joel
Joel on 6 Apr 2023
Thank you, mistake by me

Sign in to comment.

Accepted Answer

Venkat Siddarth
Venkat Siddarth on 6 Apr 2023
Edited: Venkat Siddarth on 6 Apr 2023
Hi @Joel,
From the code snippet you shared,I found that you are missing quotes around the file name parameter value.The syntax of the readtable function with file name is as follows:
readtable('<filename>');
I hope this resolves the issue
Thanks
Venkat Siddarth V

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!