Jump to content
We've recently updated our Privacy Statement, available here. ×

Automation of PowerPoint Reports from Spotfire using ironpython


Danilo Mercurio

Recommended Posts

I would like to use the text areas in spotfire to create buttons which generate powerpoint presentations containing some of the visualizations in the DXP file in a customized way. I have already found some scripts in internet on this topic, however I would like to use the company layout for the powerpoint reports.

The following code works, however this gives me a blank slide.

import clr

clr.AddReference("Microsoft.Office.Interop.PowerPoint")

import Microsoft.Office.Interop.PowerPoint as PowerPoint

####################

# Powerpoint setup

pptx = PowerPoint.ApplicationClass()

pptx.Visible = True

pres=pptx.Presentations.Open("V:..Leo.pptx")

slideCounter = 1

slide=pres.Slides.Add(slideCounter, PowerPoint.PpSlideLayout.ppLayoutBlank)

 

Instead of

slide=pres.Slides.Add(slideCounter, PowerPoint.PpSlideLayout.ppLayoutBlank)

I would like to write something like:

slide=pres.Slides.AddSlide(slideCounter, pres.SlideMaster.CustomLayouts(1))

However this gives an error.

Link to comment
Share on other sites

  • 6 months later...
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...