background
When working in PowerPoint I always use an Excel spreadsheet that sits directly behind the chart, and links to a source workbook. This method ensures that:
- The data source behind the file is readily identifiable (link to network).
- The PowerPoint file can be edited directly if needed.
- The chart can be updated for a new scenario by re-linking the underlying spreadsheet to the source workbook.
issue
Recently I came across a PowerPoint file that I needed to use the data to create a new chart. Somehow even though the chart had been created using the method I described above, the underlying data could not be accessed. I didn't want my group to have retrieve the data manually so I looked for a method that I could use again if the situation rec-occurred.
first approach
I ended up following the approach outlined at magicbeanlab which involved:
- cutting the PPT file to a single slide (with the chart I wanted).
- renaming the PPT file as a zip.
- navigating to the
/ppt/charts/directory to get the chart in xml format. - opening the xml file provided access to the data, but this was among a seas of other information.
question
What is a better method (automating the XML retrieval) or using VBA to obtain the chart data to use elsewhere?