Update chart in excel sheet using Excel tem[plate

Hi Support,

I want to use excel Template with chart on one sheet and source data on other. Once I load the source data from the C# code the saved excel (from .NET code) should show the updated chart, Just like we do for pivot tables. how can I do this in .NET ?

Thanks.

This message was posted using Email2Forum by Tilal Ahmad Sana.

Hi Sandip,


Thank you for contacting Aspose support.

What we understand from your problem description is that you wish to refresh an existing chart based on the new data. In case the data range remains the same with just changed data values, all you have to do is to call the Chart.Calculate method to refresh the chart. However, if the chart has to point to a new data range, you have to set the chart’s series, category data values and so on. The later case is similar to creating a new chart, except that you will not add the chart to the existing chart collection but manipulate an existing chart object.

Hope this helps.