Hello,
The AutoFitRows() function doesn't appear to take wrapped text than spans columns into account. Perhaps I am doing something wrong. With the following code, I am placing text into cell A1 and centering it across 4 columns. When I use the AutoFitRows() function, it sizes the row as if the text wasn't centered across the 4 columns. This isn't that big of a deal, but I was wondering if there may be an update that addresses this.
Thank you,
Dim oWorkbook As New Aspose.Cells.Workbook()
Dim oCells As Cells = oWorkbook.Worksheets(0).Cells
Dim oStyle As Style
Dim oRange As Range
oWorkbook.Styles.Add()
oStyle = oWorkbook.Styles(0)
With oStyle
.Font.Color = Drawing.Color.Black
.Font.Name = "Arial"
.Font.Size = 8
.Font.IsBold = True
.Number = 0
.HorizontalAlignment = TextAlignmentType.CenterAcross
.VerticalAlignment = TextAlignmentType.Bottom
.IsTextWrapped = True
End With
oCells(0, 0).PutValue("This is an autofit rows test with wrapped data that spans multiple columns")
oRange = oCells.CreateRange(0, 0, 1, 4)
oRange.Style = oStyle
oWorkbook.Worksheets(0).AutoFitRows()
oWorkbook.Save("autofitrowstest.xls", SaveType.OpenInExcel, FileFormatType.Default, Me.Response)