As an example, suppose I have a worksheet with a table (ListObject) spanning from A1 (first row is headers) to, say, F2 with formulas in all cells except columns B through E and, more importantly, I have disabled all table styling and have my own formatting for all the different columns in the worksheet.
Now, using Aspose Cells, I write values for, B2 through E11 in something along the following way:
var x = new Random();
for (var row = 1; row <= 10; ++row)
{
for (var col = 1; col <= 4; ++col)
{
sht.Cells[row, col].PutValue(x.Next(1, 200));
}
}
What I would suppose to happen once I save the Excel sheet would be that the table would be expanded through to row 11 and the formatting would also carry throughout the columns, but neither happens.
I did manage to update the table formatting by using the ReSize() method for the listobject, but, even then, the formatting of the columns didn’t carry across.
Ideally, I’d expect that if I entered data into an existing table and kept adding in data into rows after that, that the table would auto-resize as it does in Excel, but I definitely am not sure about what to do about the formatting not carrying through.
Any thoughts??