Trouble importing data from excel file using xlsread
조회 수: 1 (최근 30일)
이전 댓글 표시
I am having trouble importing data from excel file using xlsread. I attempt as follows:
ndata = xlsread('C:\Documents\oput021m.xlsx', 'F2:F3');
And get the following error:
??? Error using ==> xlsread at 219 XLSREAD unable to open file C:\Documents\oput021m.xlsx. File C:\Documents\oput021m.xlsx not found.
I have even tried opening a file with the .xls extension and continue to get the same error. The file is in the location that is specified, so I am not sure what is going wrong. Could someone please help me out? Thanks.
댓글 수: 0
채택된 답변
Jiro Doke
2011년 2월 20일
What do you get when you type
exist('C:\Documents\oput021m.xlsx', 'file')
Does it return 2? If 0, then you mistyped the filename. Make sure you have the correct extension. For Excel files, it could also be .xlsm, .xls, .xlsb.
댓글 수: 0
추가 답변 (2개)
Walter Roberson
2011년 2월 20일
I don't know, but I would suggest experimenting with
[fid, status] = fopen('C:\Documents\oput021m.xls','rt');
and then examining the status variable.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!