I am evaluating Aspose .Cells in order to import an Excel spreadsheet into an Aspose WebGrid.
I am having trouble with the WebGrid TableItemStyle Wrap member.
The below code is not wrapping text (also, other members that I have tried which inherit from Style - such as Height and Width - do not appear to work for me):
for (int col = 1; col <= gridWeb1.WebWorksheets.Cells.MaxColumn; col++)
// Set formatting for GridWeb Header Row
cellID = GetExcelColumnName(col) + "1";
Aspose.Cells.GridWeb.Data.WebCell thisCell = gridWeb1.WebWorksheets.Cells[cellID];
Aspose.Cells.GridWeb.TableItemStyle headerStyle = thisCell.GetStyle();
headerStyle.Font.Bold = true;
headerStyle.Font.Size = FontUnit.Point(10);
headerStyle.HorizontalAlign = HorizontalAlign.Center;
headerStyle.VerticalAlign = VerticalAlign.Bottom;
headerStyle.ForeColor = Color.Black;
headerStyle.BackColor = Color.LightYellow;
headerStyle.Wrap = true;
The font bold, size, vertical/horizontal alignment/colors are all working fine, so I know that the headerStyle is working.
Your insights into to what I'm doing wrong would be greatly appreciated.