Cells.InsertRange -> ChartSheets Problem

Hi Aspose team,

i´m using your aspose.cells objects to manipulate Excel-files.
Now i have a urgent problem with ChartSheets in exel files. A testproject (as zip) is added to this message where you can see my problem.

In detail…
The source file contains a chart-object at the first sheet and a “ChartSheet” named as Chart1.
The “chart data range” of the 2 charts refer to “=‘Tabelle1’!$A$20:$C$22” (first sheet).

When you click on the “InsertRange” button of my testproject i execute following code section
CellArea ca = new CellArea() { StartRow = 21, EndRow = 21, StartColumn = 0, EndColumn = 2 };
sheet.Cells.InsertRange(ca, 10, ShiftType.Down);


Afterwards, the data range of the embedded chart object of sheet1 extends by this 10 rows to
=‘Tabelle1’!$A$20:$C$32; that´s ok…
but, if i look to the ChartSheet there is still a datarange with =‘Tabelle1’!$A$20:$C$22;
that´s my problem…

I use Aspose.Cells Version 8.2.1.

So, what can i do to fix this problem? Is there a workaround?

Thank you.

Regards
Christoph




Hi Christoph,


Thank you for contacting Aspose support.

We have evaluated your presented scenario while using the latest version of Aspose.Cells for .NET 8.2.1.5, and are able to observe the problem as stated in your post. The behavior seems to be inconsistent for the chart present on the same worksheet and the one on another sheet. That is the reason we have logged the problem in our bug tracking system for further investigation. The ticket Id for your future reference is CELLSNET-43081. Please spare us little time to properly investigate the problem cause. In the meanwhile, we will keep you posted with updates in this regard.

Hi Christoph,

Thanks for using Aspose.Cells.

Please use sheet.Cells.InsertRange(ca, 10, ShiftType.Down,true); it will fix your issue. Let us know your feedback.

Hi,

thx, your solution is working. Sorry, for your efforts, this solution could be found by myself.

Have a nice day!

Regards,
Christoph

Hi,


Thanks for your feedback.

Good to know that your issue is sorted out now. Feel free to contact us any time if you need further help us or have some other issue or queries, we will be happy to assist you soon.

Thank you.