필터 지우기
필터 지우기

Why can I not import an excel file into MATLAB without error?

조회 수: 3 (최근 30일)
Katherine Balasingham
Katherine Balasingham 2016년 7월 1일
답변: Samuel Katongole 2021년 7월 5일
Hi,
I have an excel file with only two columns filled and 21 rows. Simply, one column is filled with x-values and the second column are y-values. Whenever I try to import that file (saved as .xlsx and I even tried saving it as .xls) into MATLAB, all I get is the error message "Could not open the spreadsheet. MATLAB reported the following error: Error: The server threw an exception."
I just want to import these values into MATLAB...it's such a small file. I could type the values in but the fact is I shouldn't have to.
  댓글 수: 2
Rodney Sinkler
Rodney Sinkler 2017년 3월 19일
I'm experiencing the same difficulty and the suggested post only addresses writing to xls. Just to be sure, I checked to see if I had any bluetooth add ins in excel and I don't. I even tried running MATLAB as an admin and the import wizard still reports "the server threw an exception" Please help!

댓글을 달려면 로그인하십시오.

답변 (1개)

Samuel Katongole
Samuel Katongole 2021년 7월 5일
Try testing your files with the following trial codes:
fid=fopen('oil_prices_testdata.csv')
fid=fopen('oil_prices_testdata.xlsx')
I had a similar challenge; and checked the file identifier (fid). A positive one indicates your file will open, and if it is -1, then it will not open. If your obtain the latter, try putting your excel file in your current (or working) directory. And agin use the import tool.

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by