Excel AutoFitRow()


#1

Hi,

I am having a problem with the autofit row. Basically a cell contains long text and I want the cell to be text wrapped and also row fit. However when I look at the Excel sheet, the text are wrapped but the row is not auto fit (actually some are some are not). Here is my code:

'do post formatting
Dim i, j As Integer

For i = 3 To x 'x is the total # of rows populated with data

For j = 0 To CELL_COUNT

ws.Cells(i, j).Style.IsTextWrapped = True

Next

ws.AutoFitRow(i)

Next

I populate all the cell with text before executing this code blockā€¦

Thanks!
C.


#2

Could you please send your file to excel@aspose.com? I will check it.