writing 1*5 char in one cell in excel

18 ビュー (過去 30 日間)
alex
alex 2011 年 11 月 18 日
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?

採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 11 月 19 日
xlswrite('test.xls',cellstr(patients))
  2 件のコメント
alex
alex 2011 年 11 月 19 日
thanks!!
i spent so much time on such a little thing...
i works great
Itamar Calderón Osuna
Itamar Calderón Osuna 2019 年 3 月 24 日
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!

サインインしてコメントする。

その他の回答 (1 件)

John
John 2011 年 11 月 19 日
Perhaps the following would work:
xlswrite('test.xls', cellstr(x))
Where "x" is a character array

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by