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?

 Akzeptierte Antwort

Stephan
Stephan am 20 Sep. 2018
Bearbeitet: Stephan am 20 Sep. 2018

3 Stimmen

Hi,
path = 'C:\Users\Stephan\Desktop';
filename = 'test.xlsx';
fullpath = [path, '\', filename];
data = xlsread(fullpath,'A1:B2');
is one possibility of solving this problem.
Also join would work:
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

1 Kommentar

Anthony Voccia
Anthony Voccia am 20 Sep. 2018
Thanks! I used the first one and modified data= and elong= which made them both work.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by