Good day,
Could you help me with AutoFitRow method? My code makes a sheet's headers rotated to 45%:
for (cellIndex = 0; cellIndex < subjectsList.Count + 5; cellIndex++)
{
sheet.Cells[0, cellIndex].Style.HorizontalAlignment = TextAlignmentType.Center;
sheet.Cells[0, cellIndex].Style.Font.IsBold = true;
sheet.Cells[0, cellIndex].Style.Borders[Aspose.Excel.BorderType.LeftBorder].LineStyle = Aspose.Excel.CellBorderType.Thin;
sheet.Cells[0, cellIndex].Style.Borders[Aspose.Excel.BorderType.RightBorder].LineStyle = Aspose.Excel.CellBorderType.Thin;
sheet.Cells[0, cellIndex].Style.Rotation = 45;
//sheet.Cells[0, cellIndex].Style.IsTextWrapped = true;
}
sheet.AutoFitRow(0);
When I set IsTextWrapped to true, I see wrapped headers and correct fitted row. But when I do not wrap the text, the row is not fitted. How can I fix this?
Thank you,
Sean