why my excel file can not be read by matlab?
조회 수: 169 (최근 30일)
이전 댓글 표시
I have simple excel file including date and rainfall in two columns. the matlab can not read the file, either import data by xlsread command. I made two format .xls and .xlsx. but matlab has an error. just it can read .csv file. matlab version is 2016a. error message after command Error using xlsread (line 251) Error: The server threw an exception.
댓글 수: 3
Image Analyst
2022년 3월 16일
@zhuyuan you probably have a hidden Excel server running that just retarting MATLAB won't get rid of. You have to restart your computer, or else if you're using WIndows type control-shift-Esc (to bring up the task manager) and kill it there.
답변 (3개)
Milad
2016년 5월 5일
편집: Milad
2016년 5월 5일
댓글 수: 7
S Deligeorges
2021년 3월 31일
Thank you for the post, it partially solved the problem for me. I was able to open the file once with xlsread, the moment I read the data, the error returned and I can no longer read the data file and get the line 257 error. COM ADD IN unchecked already, can't use the same trick again.
Shahrulnizahani Mohammad Din
2022년 9월 26일
Hi. I am facing the same prpblem.
Toubleshoot efforts:
1) clear (unchecked) the COM Add-in, clear (unchecked) "the ignore applications that use dynamic data exchange (DDE) and restarted the laptop...open MATLAB and try run it..[result : no success]
2) uninstall and re-install MATLAB and retarted the laptop..open MATLAB and try run it..[result : no success]
3) try ti change the xlsx file to xls, open MATLAB and try run it...[result : no success]
4) the the file path and filename (to check typo error)..evertything is in place
5) changed the location (from Dropbox to My Document folder) , reopen MATLANB and try to run the code [result : no success]
6) change xlstead to readtable/ read matrix [result : no success]
Pls help
thanks
Elson Leung
2023년 3월 27일
Well I am facing the same issue there, I've tried readtable, readmatrix and the rest of possible solution. All of them didnt work.
But the obvious solution is close the excel first, MATLAB apparently cannot read excel while it is opened.
댓글 수: 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!