MATLAB can't find my file

82 views (last 30 days)
Tom on 12 Dec 2012
I'm trying to read in an excel spreadsheet and I can't get it to do it.
I put the spreadsheet in the MATLAB home directory, then I put this: -
M = xlsread('Psych_anon_mine.xlsx');
And I get the error message: -
??? Error using ==> xlsread at 214 XLSREAD unable to open file Psych_anon_mine.xlsx. File /Users/Tom**********/Documents/MATLAB/Psych_anon_mine.xlsx not found.
(The stars are just my last name)
Error in ==> Ass_2_data_A at 3 M = xlsread('Psych_anon_mine.xlsx');
Any help would be greatly appreciated

Accepted Answer

Walter Roberson
Walter Roberson on 12 Dec 2012
(Looks like you are using OS-X)
At the MATLAB command prompt, try
!ls ~/Documents/MATLAB/Psych_anon*
and see if it finds the file. Perhaps there is a hidden extension.
Alireza Kharazmi
Alireza Kharazmi on 8 Aug 2016
My apologies for late response, thank you very much for your help Walter. My problem is fixed now.

Sign in to comment.

More Answers (1)

Tom on 12 Dec 2012
Yes thanks that worked. I just copied and pasted the address from that and it's working now. Many thanks.
  1 Comment
Walter Roberson
Walter Roberson on 12 Dec 2012
Was there a hidden extension? Or was there a typo in the file name?

Sign in to comment.



Community Treasure Hunt

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

Start Hunting!

Translated by