How to write a cell array of numbers and string to file

 Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 31 Août 2011

0 votes

xlswrite('test.xls',{'abc',1;2,'adsjk'});

3 commentaires

Sounds good, provided no string is more than 191 characters and the number of rows and columns do not exceed the limits of Excel. Note also this will only work on MS Windows and only if Excel is installed (it will not work on Mac even if Excel is installed there.)
A point to note for future reference: xlswrite() cannot write if there are nested cell arrays. And don't even _think_ about writing objects.
Probably a typo. The limit on the number of characters allowed in a cell when using xlswrite() is 911, not 191.
Thanks, Fangjun.

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by