Free Support Forum - aspose.com

Text wrap doesn't work in Aspose Cells 7.0.0 & 7.0.1

Hello,

I can wrap the text in 2.5.4 but not in version 7. I'm using Java 6 and MS Excel 2003. This is the version 7 code that I want to make work for text wrap.

cell = cells.get("A2");
cell.setValue("Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World");
Style style2 = cell.getStyle();
style2.setTextWrapped(true);
cell.setStyle(style2);

Please advise.

Thanks,

Peter Wu
United Launch Alliance

Hi,


You need to extend the row height or call auto-fit function.
Please add a line after setting style, i.e.:

worksheet.autoFitRow(1);

Thank you.

Hi Amjad,


autoFitRows() works brilliantly! Thanks very much for your help!

Peter