Hello,
I'm using the Aspose WebGrid to read data from database and present it in a web browser.
The loading process is ok, but when I'm using the WebGrid.WebWorksheets.SaveToExcelFile I'm getting an exception:
"
. : Font size is out of range.
at ..? (Int32 )
at ?. .? (TableItemStyle , , DefaultParams , Hashtable , )
at ?. .? (Object , WebWorksheets , Boolean , ? )
at Aspose.Cells.GridWeb.Data.WebWorksheets.SaveToExcelFile(String targetFile)
"
I have also a similar case in which the same code is working well.
I’ve tried to use the following code to check what could be wrong, running against a sample that works and to another that throws the exception.
---
foreach (WebWorksheet ws in grid.WebWorksheets)
{
for(int r=0;r<ws.Cells.MaxRow;r++)
{
for (int c = 0; c < ws.Cells.MaxColumn; c++)
{
Aspose.Cells.GridWeb.TableItemStyle s= ws.Cells[r, c].GetStyle();
System.Diagnostics.Debug.Print("{3} Row {0:00} Col {1:00} FS {2} H {4} W {5}", r, c, s.Font.Size, ws.Index, ws.Cells.GetRowHeight(r), ws.Cells.GetColumnWidth(c));
}
}
}
--
Unfortunately, it gave the same result to both cases.
Can you please help me understand what could be wrong?
Many thanks,
António Carvalho