xlsread unable to open file
조회 수: 19 (최근 30일)
이전 댓글 표시
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?

댓글 수: 0
채택된 답변
Stephan
2018년 9월 20일
편집: Stephan
2018년 9월 20일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Search Path에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!