We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How can I get aReturn into a cell

How can I get aReturn into a cell so that I can format the text in the cell?


Thanks for considering Aspose.

Well, you can insert escape seq."\n" into a cell and wrap the text in it. To write multilines into a cell, you may use IsTextWrapped to set it to true.

May the following example help you for your need.

Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets["Sheet1"];
Cells cell = ws.Cells;
cell.SetColumnWidth(0, 35);
cell[0, 0].PutValue("Voor meer informatie\nga naar de Informatiepagina op\nThis is the third line");
cell[0, 0].Style.IsTextWrapped = true;
wb.Save("d:\\test\\mulitilinescell.xls", FileFormatType.Excel2003);

Thank you.