Carriage Return in Silverlight

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

Carriage Return in Silverlight

Postby slx » Mon May 07, 2012 1:52 pm


I have a case where I would like to enter 2 lines in 1 single line in a cell.

This is supported by Excel if you hit ALT+ENTER

However, I cannot find how to generate that behavior with Spire...

So far I tried with \n and \r\n but it failed.

Any idea?

Posts: 1
Joined: Mon Mar 05, 2012 12:06 pm

Re: Carriage Return in Silverlight

Postby Eric » Tue May 08, 2012 3:26 am

Hi slx,

You need to set the cell can wraptext, so please try the following codes:

sheet.Range["A1"].Text = "Hello\r\nWorld!";
sheet.Range["A1"].Style.WrapText = true;
Best regards

E-iceblue support
E-iceblue Co.,Ltd
Posts: 17
Joined: Tue Apr 24, 2012 4:53 am

Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 1 guest