Cloning Series and all of their properties to later on add to a chart

Hello i have a routine in which I have a chart with demo data and prepared with all sorts of layout to the chart itself but also to the series. In this chart I add new data series based on different datasources. To do this I get the chartobject and add new series ranges to it. I either add them to all the demo data that is already there, or I first clear the series completely and then only add the new series so that I have a clean chart.


Now I have the following scenario:
I have a (merge)chart that I added some demo data to. Now I add some formatting to these series, for instance I add datalabels and errorbars, and for each of these settings I add some specific settings (e.g. datalabels set to ‘inside end’ and errorbar set to ‘custom’ and a specifc cell set for ‘positive error value’, and ‘negative error value’.

Finally the actual question:
When I add my new series, all these series get the default properties for the chart type, so no errorbars, no datalables, but also no font styles, colorcoding. How can I maybe clone a series object(so one that was already in the template chart and then add it as a new series, but only change the datavalue so that it completely inherits all the styling and properties.


Hi there,


Thank you for contacting Aspose support.

I think it may not be possible to achieve your goal, that is; clone the settings of an existing series, unless you inspect each relevant property of an existing series and set the new series accordingly. I will look further into this matter and share my findings here, however, I humbly request you to please provide an example spreadsheet (containing the said chart) along with an executable console application to show the flow of your application.