Excel reading - xlsread

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?

 Respuesta aceptada

Andy
Andy el 17 de Mayo de 2011

1 voto

Use the third output of xlsread:
[data, txt, raw] = xlsread(...);
The "raw" output is a cell array which contains all of your data.

3 comentarios

Oleg Komarov
Oleg Komarov el 17 de Mayo de 2011
What if I edit so that the answers are the same (devil)...
Andy
Andy el 17 de Mayo de 2011
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 el 27 de Mayo de 2011
Reputation depends upon human subjectivity, and so is probably not suitable for a bot contest.

Iniciar sesión para comentar.

Más respuestas (1)

Oleg Komarov
Oleg Komarov el 17 de Mayo de 2011

1 voto

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.

Categorías

Más información sobre Data Import from MATLAB en Centro de ayuda y File Exchange.

Preguntada:

el 17 de Mayo de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by