In the latest bugfix version of ASPOSE.Excel, there was added support for changing an existing chart’s source in an existing excel-file. This was indeed good news, because it meant that I didn’t have to implement a macro-hack to make the document behave like I wanted. But, I’m sad to say, there are bugs in the implementation.
Firstly, it’s only possible to change the chart’s source if the chart is in “fullscreen” (ie. on a separate worksheet).
Secondly, it’s not possible to add new NSeries (which is a must if you’re building dynamic spreadsheets). In the runtime excel object, the changes seem to be affected, but when the save method is called, the changes disapear.
Thirdly, it’s not possible to remove existing NSeries. When I first found out that I couldn’t add new NSeries, I thought I could workaround the problem by creating a bunch of dummy-NSeries, and then remove the ones I didn’t need. But no such luck. When the Save method is called, the component throws an exception:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Here’s the call stack:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.ArrayList.get_Item(Int32 index) +91
Aspose.Excel.Record.c4.a(c2 A_0, t A_1, Worksheets A_2)
Aspose.Excel.Worksheets.a(String A_0, SaveType A_1, FileFormatType A_2, HttpResponse A_3)
Is there anybody who know a workaround for these issues? Or will a new version of ASPOSE.Excel be released soon, where these issues are taken care of?
Jon, PRIDE ASA
Thanks for considering Aspose.Excel.
We are working on the issue of changing data source of a chart in designer file. It will be availabe within one or two weeks and will solve the shortage in current solution. Thanks for your patience.