0

I recently automated the creation of Powerpoint Presentations in a site I'm making. I found the Office Interop libraries extremely simple to use.

Office isn't built for this kind of thing in a webserver environment, so I'm looking at creating the Powerpoints using Open Office XML, only it's so extremely complex. For example I downloaded some code to create a blank presentation with some text. This code was around 300 lines! Using the Office Interop libraries I could do the same thing in just a couple of lines of code.

I don't have time, nor do I want to attempt to learn how to interact with the Open Office XML libraries, so I'm hoping someone has made a wrapper for the Open Office XML libraries. So far all my searching has only given me one result, Aspose Slides for .NET. This looks really hopeful, but it also looks rather expensive

Has anyone ever used a decent wrapper or alternative before?

Owen
  • 4,229
  • 5
  • 42
  • 50

3 Answers3

2

If you are looking at automating the creation of Powerpoint presentation files, I'd say you continue with OpenXML, there's nothing better than it. Everything else is either paid or don't offer entire gamut of functionality that Open XML can provide.

If you find creating a blank file tedious, you could save an empty file somewhere and use that as a template for performing further operations on it.

Varun Rathore
  • 7,730
  • 3
  • 27
  • 30
1

The only thing close to a wrapper for PowerPoint I've found is the Open XML PowerTools. It includes a PresentationBuilder class which can be used for some specific tasks like combining slides from multiple PowerPoint documents into a new document. Although its pretty limited in its functionality you could extend the class.

However, I've come to the conclusion that there just is not a good wrapper out there so I've had to do what everybody pretty much recommends and that is using the Open XML SDK Productivity Tool and the Reflect code button.

I put together a basic presentation then Reflect Code and put that into a class. Yes its a lot of lines of code and its not the most elegant solution but it does work. Then from there I can extend or modify that class to do the specific things I need to do with each slide. The Productivity Tool is a big help for figuring out the code need to do specific things. I try to keep it simple and just do one or two things at a time, Reflect Code, then look at the code to see what it does.

John81
  • 3,726
  • 6
  • 38
  • 58
0

You could try SoftArtisans PowerPointWriter, it has a template mode that allows you to start with an existing PowerPoint file with a few place holders, and merge your data with your presentation with as little as 5 lines of code.

Disclaimer: I work for SoftArtisans

Sam Plus Plus
  • 4,381
  • 2
  • 21
  • 43
  • 1
    I just watched a demo video for your product, it looks like it's all about replacing text in the templates, can you do the same for images with image placeholders? – Owen Jan 16 '14 at 10:25
  • 1
    You most certainly can. See http://wiki.softartisans.com/display/PPTW8/Importing+Images. Basically you can have an image place holder and specify a number of modes/ways you want it to be imported. For example a fixed size, or maybe take the size of your placeholder. I am happy to answer any other questions you might have. – Sam Plus Plus Jan 16 '14 at 22:01