I’m having a problem with the “InsertRange” method because it seems to cause a chart title to be lost if it contains the reference to a cell moved with “InsertRange”.
I have an Excel file with two sheets: in one I have a chart and its title refers to a cell in the other sheet.
I need to insert lines above the cell that contains the title and to do this I use the “InsertRange” method with “ShiftType.Down”.
The rows are inserted correctly but in the meantime the chart title disappears.
Before elaboration:BeforeElaboration.JPG (72.3 KB)
After the elaboration:AfterElaboration.JPG (73.7 KB)
I prepared a Windows Form Application project and the Excel template to replicate the problem.
The template is called “ExcelTemplate.xlsx” and in the “ChartSheet” sheet there is the chart with the title pointing to cell A1 of the “TitleSheet” sheet.
By code using “InsertRange” I move cell A1 of the “TitleSheet” downwards.Ticket Aspose.zip (154.1 KB)
I am using Aspose.Cells 20.7.0 and .NET Framework 4.7.2
Am I doing something wrong?