Hi,
I came across some problems when I tried to use the AutoFitColumn function.
The function does change the size (width) of the column, but not enough to display all the data.
Is this because, if the column would have a larger width, it would not fit on one page (A4)?
Is it possible to get set the correct width for the column (so really AutoFitColumn), so that the column is as large as the longest string data in the underlying cells?
Or is it possible to make the row higher, so that there would be more lines of data per row?
I use the following (test) code to set the AutoFitColumn function on the column:
For intColumnIndex As Integer = 0 To objRange.ColumnCount - 1
objRange.Worksheet.Cells(objRange.FirstRow, objRange.FirstColumn + intColumnIndex).Style.IsTextWrapped = False
objRange.Worksheet.AutoFitColumn(objRange.FirstColumn + intColumnIndex)
Next
I have included a picture with how the Excel file looks like after step (so as Excel template / output / how I expected it to be)
I have version 4.4.0.1 of Aspose.Cells