Auto Fit Column


I can not figure out why autoFitColumn does not work on my template. Please help. I am using the latest

Dim excel As Aspose.Excel.Excel

excel = New Aspose.Excel.Excel


Dim w As Aspose.Excel.Worksheet = excel.Worksheets(0)

For i As Int32 = 1 To 50

w.AutoFitColumn(i, 4, 30)





Row 7, which is the data header does not get auto fit.


In row 7, all cells are set as wrap text. AutoFitColumn method will not take effect on these cells. It’s same as MS Excel. To make it work, please uncheck “wrap text” option in formatting.