writing 1*5 char in one cell in excel

18 visualizaciones (últimos 30 días)
alex
alex el 18 de Nov. de 2011
Comentada: Itamar Calderón Osuna el 24 de Mzo. de 2019
i have a problem- i have parameter in matlab called patients = 82x5 type char when each row is like 234t1(has both numbers and a letter)
i want to import it to excel so that each patient name will be in one cell and not 5..( a1 = 234t1, a2 = 234t2,...)
how can i do that?

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 19 de Nov. de 2011
xlswrite('test.xls',cellstr(patients))
  2 comentarios
alex
alex el 19 de Nov. de 2011
thanks!!
i spent so much time on such a little thing...
i works great
Itamar Calderón Osuna
Itamar Calderón Osuna el 24 de Mzo. de 2019
Great help! Thank you!
I was sending a date to Excel and, instead of writing the full date in a single Excel cell, it wrote each character in a separate cell. After using cellstr() the problem was solved!

Iniciar sesión para comentar.

Más respuestas (1)

John
John el 19 de Nov. de 2011
Perhaps the following would work:
xlswrite('test.xls', cellstr(x))
Where "x" is a character array

Community Treasure Hunt

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

Start Hunting!

Translated by