We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Chart is not getting refreshed in Powerpoint presentation

Good Day,

I am trying to use Syncfusion.Presentation library in order to refresh a chart in Microsoft Powerpoint presentation (linked with Microsoft Excel) whenever data changes in Microsoft Excel. The code runs fine and produce the output file but doesn't refresh the chart. Instead, in the output file, it shows the chart empty. After initial analysis, i found that, output file created by code doesn't identify the range of data correctly. That's why, chart is being shown empty e.g. if in original file data range for chart is A12:C22, in the output file, this range is not being identified correctly and chart is shown as an empty chart. 

Code is given below

               //Opens the Presentation
                IPresentation pptxDoc = Presentation.Open(@"Path of original presentation");
                
                

                //Gets the first slide
                ISlide slide = pptxDoc.Slides[1];

                //Gets the chart in slide
                IPresentationChart chart = slide.Shapes[10] as IPresentationChart;

                //Refreshes the chart
                chart.Refresh();
                
                  
                //Saves the Presentation
                pptxDoc.Save(@"path of output file.");

                //Closes the Presentation
                pptxDoc.Close();

                MessageBox.Show("Done"); 

3 Replies

VA Vijayasurya Anandhan Syncfusion Team December 6, 2019 05:03 AM

Hi Tayyab,

Thank you for contacting Syncfusion support.

At present our Essential PowerPoint presentation Library does not provide support to the feature
Data changes in Microsoft Excel should automatically refresh the chart in the presentation slide and also we do not have any immediate plans to implement this feature.

Please let us know if you have any questions.

Regards,
Vijayasurya A



TH Tayyab Hussain December 7, 2019 10:46 PM

Good Day,

Thank you for your reply and clarification.

However, just to clear one thing, i am not expecting that change in source data present in Microsoft Excel should "automatically" update the chart in presentation. 

What is required that chart in presentation should be updated upon an event e.g. timer event. I am able to grab the chart in presentation using Syncfusion library and refresh it in an event but it doesn't show the updated linked range upon refresh and shows an empty chart.




RM Ramaraj Marimuthu Syncfusion Team December 9, 2019 03:28 AM

Hi Tayyab,

Thank you for the update.

We have considered your requirement and modified the feature title as “Update the chart data from linked Excel sheet on refresh” and as we mentioned earlier currently we do not have any immediate plans to implement this feature in our end.

Please let us know if you need any further assistances.

Regards,
Ramaraj Marimuthu. 


Loader.
Live Chat Icon For mobile
Up arrow icon