I am using Aspose Cells DLL version 6.0.1.
I have found an inconsistency in the AutoFitColumns with cell values containing trailing spaces. When I only have 9 cells with trailing spaces, the column auto-fits correctly with the header. When I have 10 cells, the auto-fit ignores the header cell value leaving the column too small.
Dim BOOK As New Aspose.Cells.Workbook
Dim SHEET = BOOK.Worksheets.Item(1 - 1)
SHEET.Cells(0, 2).Value =
"ADJUSTMENT"
For i As Integer = 1 To 10
SHEET.Cells(i, 2).Value =
"Lock "
Next i
SHEET.AutoFitColumns()
BOOK.Save(
"A.xls", Aspose.Cells.SaveFormat.Excel97To2003)