We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Add break line in an Excel Cell

Hi,

I would like to have a line break inside a cell.

I tried and it works when opening whis OpenOffice but not when opening with Excel 2007.

Have you got a solution for me ?

Thanks a lot


1 Reply

DK Dhivya K Syncfusion Team June 4, 2008 05:38 AM UTC

Hi Christophe,

Thank you for your interest in Essential XlsIO.

I am able to reproduce the issue. To make line break work for Excel 2007, please set the text wrap for the cell and then break the text as follows:


[C#]
sheet.Range["A1"].CellStyle.WrapText = true;
sheet.Range["A1"].Text = String.Format("Helloworld");


Please let me know if this helps.

Regards,
Dhivya.


Loader.
Live Chat Icon For mobile
Up arrow icon