We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem updating cellsrange in formulas and charts wen inserting rows

Workbook with data in sheet1 and some dependant charts and formulas on sheet 2,3 ecc.:

When inserting data in sheet1 I note that are updated only the rangeof cells in formulas and charts of the same sheet.
The range of the formulas and charts on other sheets are not updated.

I’m using method:
worksheet.Cells.InsertRows(row, 1); and wrote the data on cells of the new row.

If open file with Microsoft Excel and insert a new row the range specified on charts and formula are updated on all the worksheetts of the file.

I tried with xls and xlsx files but the problem is same.

I’m using Aspose Cells for 2.0.net 26/06/2014

Thank you in advance

Hi Pompei,

Thanks for your posting and using Aspose.Cells.

Please use the 2nd overload of insert rows method i.e

Worksheet.Cells.InsertRows(rowIndex, totalRows, updateReference);

set the last parameter updateReference to true, it will update the references in the other worksheets.


Cells.InsertRows Method (Int32, Int32, Boolean)

Inserts multiple rows into the worksheet.

public void InsertRows(
int rowIndex,
int totalRows,
bool updateReference


Row index.
Number of rows to be inserted.
Indicates if references in other worksheets will be updated.