Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Using Template PowerPoint file and output PowerPoint depending on different projects

knozawa
11 - Bolide

Hello,

 

I'm looking to output a PowerPoint using a PowerPoint template depending on different projects. 

Only a few fields will be updated in the PowerPoint slides based on upstream data.

I thought about using a reporting tools, but it seems like I cannot input a PowerPoint as a template input file, so modifying XML file would be a better choice in Alteryx.

 

There was a similar conversation in the Alteryx community forum: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Auto-populate-powerpoint-template-with...

If I'm understanding it correctly, this approach is to:

1. extract the PowerPoint to xml first

2. modify the xml file in Alteryx using the upstream data

3. Alteryx will produce the modified XML file, not PowerPoint

4. use the modified XML for different projects

 

I tried to follow what they've done using the XML input file, so I used a 7zip to extract the PowerPoint and it produced many xml files.  However, I was not sure which XML file was the one that contained actual content in the slide deck to modify.  Does anyone know which one to use?  Also, if there is a better way to accomplish this, I appreciate any inputs!

knozawa_0-1629072278282.png

 

Sincerely,

knozawa

16 REPLIES 16
knozawa
11 - Bolide

Thank you very much for your detailed explanation @kelly_gilbert !

I will try your suggestions and choose one.

knozawa
11 - Bolide

@kelly_gilbert 

I created another question Unzip and zip files in Python tool because the topic is different.
If you can give me some suggestions, that would be really helpful.

 

Sincerely,

knozawa

Famac
5 - Atom

Hi there, 

 

This conversation was pretty helpful for my process. Thank you 🙏. I managed to design the workflow of editing the tags of a pptx with my data accordingly.

 

However, I cannot figure out how to convert the xml file back to pptx and then to pdf without losing the powerpoint format.

 

Since my pptx template will remain as  one slide I did not zipped or used any additional folder for my slides as you describe.

I manually saved the pptx file as xml file and then I ran the workflow. The output is the one same xml file as the input and opens to powerpoint with the edits correctly 🙂. But no conversion to pptx or pdf can be completed successfully, either manually with zipping or with cmd 🤔. Do you have any idea why is this happening, or what can I try to convert the xml to pdf by keeping the presentation format?

Paridhi_Agrawal
8 - Asteroid

Hi kelly_gilbert

 

I am following this thread, and I am facing an issue.

 

I write the values to be replaced as {{Presenter_name}}, but when I checked in xml file. It is not coming as expected. PFA.

 

Can you suggest something over here as without brackets, alteryx is not recognizing the value to be replaced.

 

Thanks

Paridhi

TimPowers
6 - Meteoroid

Hi @kelly_gilbert, would you mind discussing what you're using in python for un/zipping?

 

I haven't been able to successfully install 'zipfile' (as administrator) in the python environment in Alteryx.

 

Also do you use 'python-pptx' at all? I've managed to successfully install this module, however I can't call it in an import statement - it doesn't respond to calling just 'pptx' and won't accept a hyphon or underscore to prefix it with 'python'.

kelly_gilbert
13 - Pulsar

@TimPowers, I do use zipfile to unzip and re-archive the components of the PowerPoint file (from zipfile import ZipFile).

It's part of the Python standard library, so it's interesting that it's not importing properly. My first suggestion was going to be opening Alteryx Designer in administrator mode (but it sounds like you're already doing that). What specific error are you getting when you try to import zipfile?

 

 

RE: pptx, I do import and use it (mainly to get the slide count in the presentation). Here's what I use in the Python tool to import and install it:

from ayx import Package
Package.installPackages(['python-pptx'])

import pptx



TimPowers
6 - Meteoroid

@kelly_gilbert thanks for responding so quickly - I did realize soon enough that 'zipfile' is standard (I had to reset the tool icon).

 

And calling 'pptx' did work in the administrator-opened app, but no such luck again after re-opening without those rights (which is unusual whenever I've had to install new modules) - I'll have to figure that out.

 

Nonetheless, thanks for the discussion thread on this topic - I had learnt to update a .ppt template differently (calling the .xml converted file directly and concatenating the entire file string), however it hasn't been working so I hope accessing the file on a slide-per-slide basis corrects the issue. Thanks!

Labels