InsertAndCopySheets does not work properly

For some reason the operation 

outputFile.InsertAndCopySheets(sheetSourceNo, outputFile.SheetCount + 1, 1, ExcelFile);

will not create the same sheet as it was in the template file (ExcelFile.SheetType =TSheetType.Chart). The chart was missed in the result file.

Please check the link for the template

https://www.amazon.de/clouddrive/share/3HdxajGD7gVtk6EtqNJLLYEL6S8bglHDRyUkF1Rm0Ah

The idea is that some file has a lot of sheets (with and without the charts) and new sheets should be copied from the template to the output file and the application will fill the data sheet and will modify the series definition on the chart.

Please check the link for the test application


https://www.amazon.de/clouddrive/share/dOxzY26MN4edlF23gmDEXDVzqx7QICuqR5IdwdhcsOj

The template has 4 sheets and the sheet No3 is TSheetType.Chart.

The outputt file (target_modified.xls) will not show this sheet properly.

Hi,
InsertAndCopySheet will not indeed copy chart sheets from one workbook to another: this is because some links in the chart sheets with the original workbook which are problematic to copy.

I can't say we will be able to implement this, but I have put it in our investigation list and we will try to see if it can be added.