Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

InsertAndCopySheets does not work properly

 Post Reply Post Reply
Author
Christian Hungbaur View Drop Down
New Member
New Member
Avatar

Joined: 11 Nov 2014
Posts: 29
Post Options Post Options   Quote Christian Hungbaur Quote  Post ReplyReply Direct Link To This Post Topic: InsertAndCopySheets does not work properly
    Posted: 05 Sep 2017 at 6:44pm
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.
Back to Top
Christian Hungbaur View Drop Down
New Member
New Member
Avatar

Joined: 11 Nov 2014
Posts: 29
Post Options Post Options   Quote Christian Hungbaur Quote  Post ReplyReply Direct Link To This Post Posted: 06 Sep 2017 at 9:38am
Please check the link for the test application


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

The outputt file (target_modified.xls) will not show this sheet properly.
Back to Top
Adrian Gallero View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 1175
Post Options Post Options   Quote Adrian Gallero Quote  Post ReplyReply Direct Link To This Post Posted: 06 Sep 2017 at 9:54pm
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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down