xlsread unable to open file
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anthony Voccia
am 20 Sep. 2018
Kommentiert: Anthony Voccia
am 20 Sep. 2018
I have been messing with this for a while now but have no clue what to change. The error is in line 4, any ideas?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/196299/image.png)
0 Kommentare
Akzeptierte Antwort
Stephan
am 20 Sep. 2018
Bearbeitet: Stephan
am 20 Sep. 2018
Hi,
path = 'C:\Users\Stephan\Desktop';
filename = 'test.xlsx';
fullpath = [path, '\', filename];
data = xlsread(fullpath,'A1:B2');
is one possibility of solving this problem.
path = "C:\Users\Stephan\Desktop";
filename = "test.xlsx";
fullpath = join([path, filename],"\");
data = xlsread(fullpath,'A1:B2');
Note that double quotes are used now.
Best regards
Stephan
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!