I have been trying to find a solution, be it a macro or a simple solution, to create and format charts in a powerpoint presentation. So far I could not find anything that would solve my issue. The idea is to source data from a fairly big excel file and then create several charts on several powerpoint slides. That is, one big excel file and 10 powerpoint slides, with 8 individual charts on each slide. I tried this: http://mahipalreddy.com/vba.htm#ppgraph, but that did not help at all.
How can I solve this?
Another method would be to use a free charting plugin for PowerPoint called oomfo @ http://oomfo.com
Using oomfo, you can build charts that are connected to live Excel sheets. Once you've built a chart connected to the Excel data source, whenever the Excel worksheet gets updated, and the presentation is viewed, the charts automatically pull in the latest data. You'll just need to ensure that PowerPoint should have access to that Excel file (either locally or remotely).
Link to documentation of Excel data source is at http://docs.oomfo.com/charts/1.0/contents/chart_data/data_excel.html
This is the approach I would use:
array
variables..ChartData
).There are other methods like using OLEObjects to link/embed, but frankly those are a pain to work with, and can pose problems if the file(s) are on a shared drive, if they're moved or renamed, etc.
Here is the general framework I describe above.
This will require a good amount of modification on your end -- for example this is configured only for 1 chart on 1 slide, and I have no idea how your data in Excel is arranged, so I just put in some dummy code to show how I would capture some values from Excel, you'll obviously need to fine tune that with a good amount of code so that it is dynamic enough to work on all charts (this can be done easily enough if your data is organized well, and you know your way around Excel VBA).
This method does not write to the chart's data sheet. Frankly I see that as an unnecessary step if you are creating a macro-driven dashboard, there should not be any reason to need the data sheet, but if that is needed for some reason, we can modify the way the chart's series are created.