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

Free Support Forum - aspose.com

Copy Worksheet from 'Book A' to 'Book B' With Charts

Hi there Aspose team,

I have a requirement to copy a worksheet from a workbook called ‘Workbook A’ which contains four charts and the underlying data associated with them to a workbook called ‘Workbook B’ in a sheet of the same name.

However, when i run the Worksheets.Copy() method to copy the sheet i recieve the following exception;

Index was out of range. Must be non-negative & less than the size of the collection. Paraemeter name: index’

From reading the forums the copying of charts should be supported (v4.9.0 being used). Is there any asitance you could provide.


Danny Brown

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please share your template files and sample code here. We will your issue and get back to you soon.

Thank You & Best Regards,

Thank you again for your quick response. After running through a simple harness I realised the issue was with the chart having a broken link and this prevented it copying.

With this fixed the copy operation worked perfectly bringing over all charts as expected.


Danny Brown