Create PowerPoint Template
Creating a PowerPoint template involves designing a .pptx file with expressions that will be dynamically replaced by data.
By following this guide, you can create a fully customizable PowerPoint template that the rendering engine can populate with dynamic data, making it perfect for reports, sales presentations, business summaries, etc.
Setup Slides
Open Microsoft PowerPoint (recommended) or any app that supports .pptx files, (Google Slides, LibreOffice, etc.)
Create a basic slide setup:
Choose a theme or create a full customization if you want a specific design.
Add the necessary elements according to your needs (titles, content, tables, shapes or other layout components).
Add Dynamic Expressions
To allow the rendering engine to replace content dynamically, expressions in format {{}}
must be used.
Account Plan: {{recordName}} {{accountName}}
Click anywhere on the slide and type the expression.
Adjust the font size, color, and alignment as needed.
Helpers
Built-in helpers can be used inside templates to apply custom logic, formatting, and can even dynamically produce layout elements directly within the expressions.
Example of correct syntax:
{{helper_name value param1=paramValue param2=paramValue ...}}
The return value of the helpers is inserted at the place it was called. Each helper has a unique syntax and purpose.
Below is the list of available helpers.
xEach
Repeats content for the collection or object of properties based on the provided parameters
Must be applied inside alt text for any element that needs to repeated.
Parameters can contain reference to data or to static text.
All parameters are optional.
Syntax
{{xEach arr dir=”x” repeat=”4” limit=”12” mx=”0.5” my=”1” order=”attribute DESC”}} {{xEach obj dir=”y” repeat=”3” limit=”12” order=”attribute ASC” filter=”(prop1 = 'value1' AND prop2 IN ('value2','value3'))”}}
Parameters
dir
- indicates the direction to repeat.x is default and means horizontal direction
y is vertical direction.
repeat
- indicates how many repetitions before moving to the next line.If the property is not defined it will be calculated dynamically based on the content and slide sizes.
limit
- the maximum number of itemsIf not defined, the default value is 12.
mx
- horizontal margin value between items.If not defined, it will be calculated dynamically to place items proportionally.
my
- vertical margin value between items.If not defined, it will be calculated dynamically to place items proportionally.
order
- defines sorting order for processed records.By default there is no sorting done.
filter
- logical condition that reduces the number of processed records.
Example
xShape
Dynamically updates shape based on the provided parameters.
Must be applied inside the shape alt text.
Parameters can contain reference to data or static text.
All parameters are optional.
Syntax
{{xShape text=dynamic.value textColor="#static_hex_color" fillColor=dinamic.hex.color}}
Parameters
text
- text which will be inserted inside the shape.Configured text styles for shape will stay.
textColor
- color for the text.fillColor
- color to fill the shape.
Example
xTable
Builds tables based on the provided data and parameters.
Must be applied inside the table alt text.
Table and cells can be styled in the template.
Configured styles are respected unless instructed to override.
Cells can be styled based on the provided value inside the data.
These instructions will override predefined template table styles.
Helper data (rows
, tblObj
) can be either an array of rows or objects with full table description (columns and rows).
Data
Array
"customRows": [ { "name": "Dima", "age": 37 }, { "name": { "value": "Pavlo", "bg": "#eb4034" }, "age": { "value": 37, "bg": "#fcba03", "font": { "size": "14", "bold": true, "color": "#000000" } } }, { "name": "Ivan", "age": 30 }, { "name": "Andriy", "age": { "value": 40, "font": { "size": "14", "bold": true, "color": "#000000" } } } ]
Object
"customTable": { "rows": [ { "name": "Dima", "age": 37 }, { "name": { "value": "Pavlo", "bg": "#eb4034" }, "age": { "value": 37, "bg": "#fcba03", "align": "right-center", "font": { "size": "14", "bold": true, "color": "#000000" } } }, { "name": "Ivan", "age": 30 }, { "name": "Andriy", "age": 40 } ], "columns": [ { "label": "Name", "value": "name", "bg": "#000000", "size": "10%", "align": "right-top", "font": { "size": "14", "bold": true, "color": "#FFFFFF" } }, { "label": "Age", "value": "age" } ] }
Syntax
{{xTable rows filter="(prop1 = 'value1' AND prop2 IN ('value2','value3'))"}} {{xTable tblObj order="attribute ASC"}}
Parameters
order
- defines sorting order for processed rows.By default there is no sorting done.
filter
- logical condition that reduces the number of processed rows.
Example
xImage
Replaces rectangle shape with image based on the provided url or base64 data.
Must be applied inside rectangle shape alt text.
Image size is based on the original rectangle shape size.
Syntax
{{xImage link.to.image}} {{xImage base64.image.format}}
Example
xWith
Navigates to a specific variable of object so all nested shapes can access props directly.
Must be applied inside element alt text.
Syntax
{{xWith obj}}
Example
xCheck
Renders checkbox mark based on a true or false value.
Must be applied inside rectangle alt text.
Parameters can contain reference to data or static text.
All parameters are optional.
Syntax
{{xCheck value trueColor=dinamic.hex.color falseColor=”#static_hex_color”}}
Parameters
trueColor
- represents color of the true check mark.Default value is
#81BB42
.
falseColor
- represents color of the false check mark.Default value is
#DF2E28
.
Example
truncate
Allows truncation of long text.
Syntax
{{truncate value length}}
Parameters
length
- represents how many characters are visible before truncating
Example
Notes
Always define helpers from the nested component to the upper.
If you need to process a group inside another group, the nested group must be defined first.
The source data for the nested expression is the upper data.
e.g. you have hierarchy of groups and objects
{scorecard.categories[n].questions[n].score}
.The upper group will iterate over
{{xEach scorecard.categories}}
The nested group will iterate over
{{xEach questions}}
.
Content can overflow slide sizes.
PowerPoint table cells can only contain text.
PowerPoint table cells cannot hold images, shapes, or other tables.
PowerPoint cell text overflow cannot be detected during generation.
PowerPoint does not support html, meaning rich text will be rendered as plain text without formatting.
Sources
PowerPoint Template:
Data: