Hi,
I have done some testing withe the following code:
GridDesktop grid = UCGrid.gridDesktop1;
// create a temp copy of xml file and extend the cells
Aspose.Cells.Workbook book = new Workbook(xmlSSFilename);
string wsname = book.Worksheets[0].Name;
// fill the grid with empty cells to make it “MS Excel like”
for (int i = 0; i < book.Worksheets.Count; i++)
{
Aspose.Cells.Worksheet ws = book.Worksheets[i];
wsname = ws.Name;
int maxrowsize = ((ws.Cells.Rows.Count / 500) + 1) * 500;
int maxcolsize = ((ws.Cells.Columns.Count / 500) + 1) * 500;
maxrowsize = 500;
maxcolsize = 256;
ws.Cells[maxrowsize, maxcolsize].PutValue(" ");
}
string tmpFile = Path.Combine(Path.GetTempPath(), “XclDoc.xml”);
book.Save(tmpFile, SaveFormat.SpreadsheetML);
grid.ImportExcelFile(tmpFile);
Loading the file with Aspose Cells Workbook and saving in a temp file bypasses the problem of dealing with the worksheets of the grid itself. If I could do it without an intermediary temp file, it will be a relief.
However, the code I post in this comment works only if you change the maxcolsize to 255 !
This is a value loved by developers ! When it is 256, the grid displays only the cells loaded in the original file and ignores the runtime PutValue().
So now I have 2 issues to solve.
the file I use is attached!