Problem opening excel csv file using xlsread

조회 수: 3 (최근 30일)
Colin Gilbert
Colin Gilbert 2015년 11월 25일
댓글: ravi 2016년 4월 11일
I am trying to use the xlsread function to open a part of a CVS excel file that is too large to open in excel (1.07 GB).
B = xlsread('programtest.csv','Sheet 1','A10:F28');
However, I get the following error:
??? Error: The server threw an exception.
Error in ==> xlsread at 250 ExcelWorkbook = Excel.workbooks.Open(file,0,true);
Error in ==> programtest at 5 B = xlsread('programtest.csv','Sheet 1','A10:F28');
Is there a way to solve this issue? Thanks
  댓글 수: 1
ravi
ravi 2016년 4월 11일
I was encountering the same problem since long. I tried saving the excel file in 97-2003 format. And then xlsread worked well :-)

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

채택된 답변

Mohammad Abouali
Mohammad Abouali 2015년 11월 26일
for CSV file you should use readtable() or csvread().

추가 답변 (1개)

Walter Roberson
Walter Roberson 2015년 11월 26일
You are using MS Windows. On MS Windows, Excel is invoked by xlsread() to read the file, so if Excel cannot read the file then xlsread() cannot read the file either.
Mohammad mentioned csvread(); another possibility is fopen/textscan/fclose (which csvread will use internally); or fopen/fscanf()/fclose depending on the complexity of the file.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by