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

Free Support Forum - aspose.com

Text does not appear outside of cell


My apologies if this question has been asked and I have not found the answer to it. I am creating a new Excel Workbook purely using Aspose Cells. I am finding that there is no overflow resulting in text being cutoff as can be seen here:

Cut off text in Aspose Cells.pdf (48.6 KB)

Is there any setting I can use to prevent this?



Thanks for the sample PDF file.

I can see some part of text in the cells are hidden or not shown because the column’s width is less. A better way to cope with it is you should use Worksheet.AutoFitColumn/AutoFitColumns method(s), see the document for your reference:

Also, see the sample line of code for your reference:
Sample code:

 //Extend/fit the column's width in accordance with longest value of cell(s) to display the text/value fully. 
//AutFit the first column in the first worksheet. You may apply autofit operation for your specified worksheet accordingly.

Hope, this helps a bit.

Hello Amjad,

Thanks for the reply. It is by-design that the column width is less than the text. In Excel with an Interop and Office Open XML the text shows despite the column’s length being smaller. Does Aspose offer similar functionality?

Very Best Regards,


Text in cell will only overflow if the next cell in next column is empty. Please see the following sample code, read its comment and check the screenshot that explains why text in cell A5 overflows. When B5 is empty, A5 text overflows but when B5 is non-empty, the text does not overflow.


Workbook wb = new Workbook();

Worksheet ws = wb.Worksheets[0];

ws.Cells["A3"].PutValue("This text is long so it will overflow.");

ws.Cells["A5"].PutValue("This text is long but it will overflow. Because next cell B5 is not empty.");

//Comment this line to see effect on the output Excel file



Ah, so I see. This was definitely the issue and, when I no longer output blank text into a cell, this worked flawlessly. Many thanks, Shakeel!


Thanks for using Aspose APIs.

It is good to know that your issue is resolved now. Let us know if you encounter any other issue, we will be glad to help you further.