I have a PowerPoint template that contains one slide and on that slide is a chart. I'd like to be able to manipulate that chart's data using .NET.
So far I have code that...
- unzips the Powerpoint file.
- unzips the embedded excel file (ppt\embeddings\Microsoft_Office_Excel_Worksheet1.xlsx)
- It successfully manipulates the data in the excel sheet and zips it back up.
- Opens and manipulates ppt\charts\chart1.xml
- Powerpoint is then zipped up and delivered to the user
The result of this is a PowerPoint file that shows a blank chart. But when I click on the chart and go to edit data it updates the data and shows the correct chart.
I believe my problem is with the chart1.xml that I am generating. I have compared my generated version with a version created by PowerPoint and they are almost identical. The only differences are in the values for <c:crossAx/>
and <c:axId/>
.
There are also some rounding differences in the data. But I do not feel like that would result in a blank chart.
Is there another file that I need to edit? Does anyone have any ideas as to what else I should try to get this working?