Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

line break in Excel cell

10 views
Skip to first unread message

Jette

unread,
Oct 7, 2009, 3:00:20 AM10/7/09
to
Hello,

I would like to export some text data to Excel and tried using the MATLAB xlswrite function. This works except for one thing:

I need to have Excel cells extending over several lines with line breaks defined by me. Something like this:

--------------------------------------------------------------
Number | Contents 1 | bla |
| Contents 2 | |
--------------------------------------------------------------

Is there a way to do so?

Thanks
Jette

Yair Altman

unread,
Oct 10, 2009, 6:21:01 PM10/10/09
to
"Jette" <jette.s...@web.de> wrote in message <hahea3$s60$1...@fred.mathworks.com>...


If you mean that you need multiple lines in a single Excell cell, then you should add the Newline character = char(10) into your cell text: ['Contents 1' char(10) 'Contents 2'].

Yair Altman
http://UndocumentedMatlab.com

0 new messages