Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to automate the generation of PowerPoint slides? [closed]

I have a bunch of data in a database and I want to generate some tables in PowerPoint. I had started doing this manually but I thought there might be a way I can simply write some code to take my data from the database and output it onto a PowerPoint slide.

Any advice here?

like image 956
leora Avatar asked Jan 26 '10 17:01

leora


1 Answers

You can certainly automate powerpoint trough the use of its XPCOM api -- (although, everytime I looked for documentation on the COM API for MS Office I haven't found it)

But, I'd suggest that instead of creating PowerPoint slides, you created Open Document presentations (ISO 26300 - .ODT files) - which are easy to undestand, parse and edit programatically -

.ODT files are the default presentation format for Open Office, Koffice, and other office software, and I think that Microsoft has come to support it by now - (although they have pushed ISO to approve their own proprietary specification of a similar format)

Anyway, editing the contents of a .odp file is trivial; the ODP file itself is a zipped archive, you unzip it, and edit the "contents.xml" file inside it -- creating new slides is a matter of copying the XML node corresponding to a slide and editing the desired text -- and pack everything inside a zip archive again.

like image 113
jsbueno Avatar answered Oct 07 '22 12:10

jsbueno