Hi
I am using Aspose.Cells for .Net
Suppose we we have sheet with next values
I’ve loaded workbook
var worksheet = new Workbook(filePath, new LoadOptions)[0];
I’ve copied references of all non null cells to some array
for (var i = firstRow; i <= lastRow; i++)
{
cells[i] = new Cell[width];
for (var j = firstColumn; j <= lastColumn; j++)
{
cells[i][j] = worksheet.Cells[i, j];
}
}
return new Table(cells);
public Table(Cell[][] elements, Worksheet worksheet)
{
Elements = elements;
}
I am inserting range of empty cells to aspose sheet
worksheet.Cells.InsertRange(CellArea.CreateCellArea(0, 0, 1, 1), 1, ShiftType.Down, true);
And I am expecting that cell objects in the array will update their adresses like they do when I insert row worksheet.Cells.InsertRow
or column worksheet.Cells.InsertColumn
. But unfortunately cells don’t update their adresses after method InsertRange
even for parameter updateReferences = true
. Below couple of screenshots to illustrate this (after calling method InsertRange
)
So, my question is how to update cells in array after InsertRange
according new adresses in worksheet.
Any help would be greatly appreciated.
Thanks