필터 지우기
필터 지우기

Excel reading - xlsread

조회 수: 1 (최근 30일)
ben harper
ben harper 2011년 5월 17일
Hello i want to read some data from Excel worksheet. When i use "xlsread" some of the cells isn't readen by Matlab. For example a,b,c,d, etc. columns (4 to 11th columns)can be read, but name date and time columns (first three columns) can't be read in my example below.
How can i fix this without changing so much in excel worksheet?

채택된 답변

Andy
Andy 2011년 5월 17일
Use the third output of xlsread:
[data, txt, raw] = xlsread(...);
The "raw" output is a cell array which contains all of your data.
  댓글 수: 3
Andy
Andy 2011년 5월 17일
I suppose in retaliation I would have to write a bot which follows your answers and duplicates them, stealing (expected) half of your future reputation. ;)
On a related note, it would make an interesting future MATLAB contest to write a MATLAB Answers bot which generates the highest reputation in a given time period.
Walter Roberson
Walter Roberson 2011년 5월 27일
Reputation depends upon human subjectivity, and so is probably not suitable for a bot contest.

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

추가 답변 (1개)

Oleg Komarov
Oleg Komarov 2011년 5월 17일
Use the second output of xlsread.
[data, text] = xlsread(...);
The first three columns and the first row is interpreted as char type and you cannot mix doubles with chars.

카테고리

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