简体   繁体   中英

How to copy data from Powerpoint charts into Excel

I have a couple of Powerpoint decks the first 3 slides of whom contains charts. Presently, I need to go in each of them and copy data from those charts and paste them in an excel workbook. Is there a way to do this using VBA?

The Powerpoint charts are not pulling data from Excel. I saw another thread which tweaks the data for a Powerpoint table but nothing on charts. Also, I need to copy and paste that data into excel.

One way to access the data in 2016, is to access the series collection(s).

With ActivePresentation.Slides(2).Shapes
if .name = "Chart1" then
"Sheet1!$B$1" = .Chart.SeriesCollection(1).Values

This is for slide # 2, Chart 1 and series 1. You can cycle through all the shapes on a slide by using :

For Each oSH In ActivePresentation.Slides(2).Shapes

The easiest way is to name all the shapes you need data from so that you can focus directly on those objects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM