During this week's client project we had a unique task to dynamically update PowerPoint templates with through Alteryx. If you ever encounter this niche problem this how to do it!
![](https://www.thedataschool.co.uk/content/images/2022/05/image-121.png)
Step 1 Input Configuration
In this basic example we will attempting to replace 'Title', 'Sub-Title' and 'Description' with our custom strings. To do this we will first need to save the PowerPoint in an XML format.
![](https://www.thedataschool.co.uk/content/images/2022/05/image-105.png)
Next, input this file into Alteryx. We need to configure the Input tool to make the data editable within Alteryx. Firstly, set the file format to csv:
![](https://www.thedataschool.co.uk/content/images/2022/05/image-106.png)
Next set the delimiter to a character which doesn't appear in the XML string. You can check this by opening the XML in a text editor and searching for a potential delimiter, I have chosen a comma. Use CTRL+F to search.
![](https://www.thedataschool.co.uk/content/images/2022/05/image-107.png)
![](https://www.thedataschool.co.uk/content/images/2022/05/image-108.png)
Next, uncheck 'First Row Contains Field Names' and set the field length a large number to satisfy the large XML file:
![](https://www.thedataschool.co.uk/content/images/2022/05/image-109.png)
Finally, change Code Page to Unicode UTF-8, this is to match the corresponding Code Page in PowerPoint.
![](https://www.thedataschool.co.uk/content/images/2022/05/image-110.png)
Step 2 Workflow
Add in your replacement text
![](https://www.thedataschool.co.uk/content/images/2022/05/image-111.png)
Concatenate your XML field into one row using the summarize tool, to change it into it's original XML format (which we saw in the text editor). Remember to not include a delimiter:
![](https://www.thedataschool.co.uk/content/images/2022/05/image-117.png)
Next transpose our new data to prepare it for the 'Find Replace' tool. Attach the tool and configure as shown below:
![](https://www.thedataschool.co.uk/content/images/2022/05/image-114.png)
![](https://www.thedataschool.co.uk/content/images/2022/05/image-115.png)
This (hopefully) should substitute out the PowerPoint text found within the XML with our replacement text by scanning through the XML for 'Name' and replacing it with 'Value'
Step 3 Output Configuration
To output we need to first save the file as an .xml with a csv format:
![](https://www.thedataschool.co.uk/content/images/2022/05/image-116.png)
Continue to configure the output tool as shown below:
![](https://www.thedataschool.co.uk/content/images/2022/05/image-118.png)
Similar to the input, set the file format to csv and code page to UTF-8. However this time we're setting delimiters to '\0' (no delimiter). Hit run and inspect the results!
Load up PowerPoint and open your new XML file:
![](https://www.thedataschool.co.uk/content/images/2022/05/image-120.png)
Overall this can be a tricky task, especially the configuration. Feel free to contact me for help!