Search code examples
c#powerpointopenxml

Is it possible to update a PowerPoint slide with new data (in C#)?


Are there any examples out there on how to update a PowerPoint slide (by clearing the text in a certain textbox and updating it with new content)?

I have a monthly report to generate in PowerPoint and I have all the data in a database. I am trying to determine if I can simply autogenerate the slides by having a blank PowerPoint template with three textboxes and the data would get filled in from my C# code.

The other examples i would look for are:

  • bulletted lists
  • tables

Any help in the right direction would be appreciated. I see a few questions on SOF that are similar but none seems to answer this question.

I assume the easiest would be to use the OpenXML format (.pptx) as i am running on a web server that may not have PowerPoint on the machine.


Solution

  • Yeah this is possible and here is a tutorial on how to do it online. They also have the sample code for the project in that blog which should help.