필터 지우기
필터 지우기

Can't run xlsread on Ubuntu Machine

조회 수: 6 (최근 30일)
Ozan Can Sahin
Ozan Can Sahin 2020년 6월 1일
댓글: Cris LaPierre 2020년 6월 3일
Hi all,
I'm using MATLAB R2019a on my Ubuntu(20.04) pc and I'm having some issues when I try running xlsread command. I created files with both .ods and .xlsx extensions (LibreOffice and Excel extensions) but I couldn't see the table I inserted in those files. But for those files, I got different errors. The errors are given below. Please note that I created the Excel file by changing the file extension of LibreOffice sheet. I'd appreciate any help.
Cheers,
Ozan
For Excel sheet:
>> data = xlsread('Sensors_excel')
Error using xlsread (line 257)
Could not open file /tmp/tp5a312b2b_fa72_4df9_a63a_38678b95f907/xl/_rels/workbook.xml.rels. No such file or
directory.
For LibreOffice sheet:
>> data = xlsread('Sensors')
Error using xlsread (line 136)
XLSREAD unable to open file 'Sensors'.
File 'Sensors' not found.

답변 (1개)

Cris LaPierre
Cris LaPierre 2020년 6월 1일
The error seems to suggest either the name of your file is wrong, or the file is not in your current folder. If you need help changing the current folder, see my reply here.
I do recommend using readtable instead.
  댓글 수: 2
Ozan Can Sahin
Ozan Can Sahin 2020년 6월 3일
Neither with xlsread nor with readtable I couldn't open the .ods files, but I managed to open Excel files with the help of the reply you sent to me. When trying to open .ods files, I am getting the errors below.
Xlsread:
>> xlsread('Sensors.ods')
Error using xlsread (line 257)
File contains unexpected record length. Try saving as Excel 98.
Readtable:
>> readtable('Sensors.ods')
Error using readtable (line 216)
File extension 'ods' is not supported on computers without Excel for Windows or when 'UseExcel' is set to
false.
Cris LaPierre
Cris LaPierre 2020년 6월 3일
I've always used a Windows System that has Excel. While those errors are likely descriptive enough, I did find additional info on supported file types here.
If it is numeric data you want to import, consider looking into this File Exchange submission.

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

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by