Word PDF Generator
This article outlines how to use the Word PDF Generator add-on, its properties, and how to generate Word document outputs from your Squirrel365 projects.
The Word PDF Generator add-on is currently not publicly available on the Squirrel Marketplace. If you're interested, or would like more information, please get in touch.
The Word PDF Generator add-on lets you produce dynamic Word (.docx) and PDF outputs directly from your published Squirrel365 apps. You design a template in Microsoft Word, upload it to the Squirrel Cloud, and map placeholders in the template to data in your Squirrel spreadsheet. When an end user clicks the generate button, the add-on injects live data into the template and downloads the finished file — all in real time, with no data stored on the server.
Creating your Word template
The add-on works by taking a previously created Word document and injecting data from your Squirrel365 project into it at runtime. The template controls the output's layout, styling, branding, and static content — everything that doesn't change between generated documents.
Like the PowerPoint PDF Generator, the Word PDF Generator uses placeholder syntax — {{value_name}} — to mark where dynamic data should be injected. Placeholders can be placed inline within text (e.g. Dear {{client_name}}, your total is {{total_amount}}), or in the Alt Text field of non-text objects like images and tables.
A few things to keep in mind when designing your template:
Placeholders must be unique. Each placeholder name should appear only once in the template, unless you intentionally want the same value to appear in multiple places.
Use clear, descriptive names. While placeholders like
{{result_1}}and{{result_2}}are technically fine, using descriptive names like{{client_name}}or{{total_revenue}}makes the template much easier to maintain.Format your static content. Any formatting, branding, headers, footers, and static text in the template will be preserved exactly as designed in the output.

Adding placeholders as alt text
To add alt text on tables
Right click on the table and select Table Properties
Navigate to the Allt Text tab in the table proprties dialog
Add the
{{placeholder}}name in the Title field

To add alt text on images
Right click on the image and select View alt text
Add the
{{Placeholder}}in the alt text panel

Uploading your Word template to the Squirrel Cloud
For the add-on to connect to your template and generate an output, you'll need to upload your Word file to the Squirrel Cloud.
Log in to your Squirrel account at https://cloud.squirrel365.io/account/login
Navigate to the External Documents tab on the left-side panel.
Select Add New File in the top-left corner and upload your Word (.docx) file.
Once uploaded, your screen will display a list of the placeholders found within the template on the left side, and usage analytics on the right.
Click Back at the top-left corner to return to the main External Documents page, where all your uploaded files are listed.
Here you'll see two keys — the API key and the GUID key. These allow the add-on to connect to your uploaded template.
Important: Make sure you have the correct keys when connecting the add-on. If they're incorrect, the output generation will fail. Always verify that the keys haven't changed whenever you upload or update a template, as this will affect the generator.
Connecting the add-on to the template
In the Squirrel365 designer, place the Word PDF Generator add-on on the canvas. You'll find it under the Add-ons menu on the left-hand panel.
Under the GENERAL properties, you'll see the following fields:
Squirrel API Key — paste the API key from your External Documents page.
Document GUID — paste the GUID key from your External Documents page.
Generated filename — this will be the name of the downloaded file. This property can be bound to a cell in the spreadsheet.
Status message — (optional) bind this to a cell in the spreadsheet to receive progress updates and error messages during generation.
Exported file format — choose whether the output should be a Word document (.docx) or a PDF.

Tip: You can put both keys in your Squirrel spreadsheet and bind the properties to those cells. That way, if you ever need to update them, you can simply change the values in the spreadsheet without having to find the add-on component.
Connecting the replacement data
To produce dynamic outputs you need to take data from your Squirrel project — calculations, text, images, and tabular data — and inject it into the template. The replacement data is configured under the TEMPLATE REPLACEMENTS section of the properties panel.

Replacement types
Under the TEMPLATE REPLACEMENTS section in the properties panel, you'll find four types of replacement. Each one uses placeholders, but in different ways.
Note: For each replacement type to be active, you need to check the checkbox beside the section heading. These are unchecked by default.
SINGLE VALUES
The simplest form of value replacement. Single value placeholders are placed directly in the body text of your Word template — either standalone or within a sentence.
For example, in the template:
Dear {{client_name}}, your total is {{total_amount}}.
At generation time, each placeholder is replaced with the corresponding value from the Squirrel spreadsheet.
For each single value replacement, configure:
Template — the placeholder name as it appears in the Word template (without the curly brackets). For example, if the template contains
{{client_name}}, enterclient_name.Value — the cell in the Squirrel spreadsheet containing the data to inject. This can be bound using the cell-binding icon.
Cell formatting is not preserved. Values formatted as currency, percentage, date/time, or similar will be passed to the soument without formatting. We recommend using the TEXT() funtion to format any value bound to the add-on.
To add more single value replacements, click the + button at the top of the list.
IMAGES
Images can be dynamically replaced by placing the placeholder in the Alt Text field of an image in the Word template. In Squirrel, the replacement is bound to a cell containing an image URL.
For each image replacement, configure:
Template — the placeholder name as it appears in the image's Alt Text in the Word template (without the curly brackets).
Image URL — the cell in the Squirrel spreadsheet containing the URL of the image to inject. This can be bound using the cell-binding icon.
Note: The output image will be adjusted to match the size of the original image in the template. Make sure the "Lock aspect ratio" option is set in Word to prevent distortion if the replacement image is a different size to the original.
To add more image replacements, click the + button at the top of the list.
TABLES
Tables allow you to inject tabular data from your Squirrel spreadsheet into a table in the Word template. The generator uses the table's structure as a guide — keeping header and footer rows intact, and filling the rows in between with your data.
Remember, to set up a table replacement in the word document, add the placeholder to the Table Properties > Alt Text.
For each table replacement, configure:
Table Alt Tag — the placeholder name as it appears in the table's Alt Text in the Word template (without the curly brackets).
New Table Data — the range in the Squirrel spreadsheet containing the data to inject. This can be bound using the cell-binding icon.
Does the table data contain header — check this if the first row of your spreadsheet data is a header row. When checked, the generator maps the first row of the data to the first row of the template table (the header), and populates the remaining rows below it.
How many footer rows — enter the number of rows at the bottom of the template table that should be preserved as static footer rows. The generator will keep these intact and only inject data into the rows above them.
The generator takes your template table, preserves the header row (if flagged) and any footer rows you specify, and fills or expands the rows in between with data from the spreadsheet range.
To add more table replacements, click the + button at the top of the list.
REPEAT TABLES
Repeat Tables work differently from standard table replacements. Instead of filling rows within a single table, the generator duplicates the entire table once for each row of data in the bound spreadsheet range. This is useful when you need to produce a repeating block of content — for example, a service summary, a detail card, or a per-record section that should appear once for each item in your data.
Repeat Tables use a two-part syntax:
1. In the table's Alt Text, use the {{RT|name}} syntax to identify the table as a repeat table. For example: {{RT|services}}.
2. Inside the table cells, use [[name|column_header]] placeholders to mark where individual data values should be injected. The name must match the name used in the Alt Text, and the column_header must match a column header in the first row of the bound data range.
For example, a template table might look like this:
[[services|ServiceName]]
Description: [[services|desc]]
Timescale: [[services|timescale]]
With {{RT|services}} in the table's Alt Text.
In Squirrel, the Repeat Table Data is bound to a spreadsheet range where the first row contains column headers that match the placeholder names. For example, if the data range is Sheet1!J10:L14:

The generator matches each [[services|column_header]] placeholder to the corresponding column in the data, and produces one copy of the table for each data row. In this example, the output would contain four copies of the table — one for each service.
For each repeat table replacement, configure:
Repeat Table Alt Tag — the name used in the
{{RT|name}}syntax in the table's Alt Text. For example, if the Alt Text contains{{RT|services}}, enterservices.Repeat Table Data — the range in the Squirrel spreadsheet containing the data, including the header row. The first row must contain column headers that match the placeholder names used inside the table cells. This can be bound using the cell-binding icon.
To add more repeat table replacements, click the + button at the top of the list.
Images in repeat tables
You can also include dynamic images inside a repeat table. Use the [[IMG|tableID|placeholder]] syntax in the table cell where you want the image to appear.
For example, if your repeat table is identified as EQUIP (i.e. the Alt Text is {{RT|EQUIP}}), and you want to inject an image called photo, place the following in the relevant cell:
[[IMG|EQUIP|photo]]
The tableID must match the name used in the repeat table's Alt Text, and the placeholder should correspond to a column in the data range that contains the image URL.
Repeat counter shortcode
If you need to display the current repeat number (e.g. "Item 1", "Item 2", etc.), use the [[#]] shortcode inside the table. This is automatically replaced with the count of the current repeat — starting at 1 for the first copy of the table, 2 for the second, and so on.
For example, placing Item [[#]] in a cell would produce "Item 1", "Item 2", "Item 3", etc. across the generated tables.
Styling the component
As with all components in Squirrel365, the Word PDF Generator button can be styled to match your project or branding. The styling properties are identical to those of the PDF & PowerPoint Generator.
General styling
Generate DOCX text — the default text displayed on the button before interaction. This property can be bound to the spreadsheet.
Generating DOCX text — the text displayed on the button while the document is being generated. This property can be bound to the spreadsheet.
Font
Font — choose a font style from the dropdown list.
Size — change the font size using the spinner buttons, by typing a value, or by binding to a spreadsheet cell.
B / I / U — toggle bold, italic, and underline formatting for the button text.
Text Colour — set the colour of the button text.
Opacity — adjust the transparency of the button text.
Text Alignment — align the text to the left, right, or centre.
Capitalisation — change the letter case to uppercase first letter, all uppercase, or all lowercase. Deselecting all options returns the text to its original case.
Border
Border weight — adjusts the weight of the component border. This can be bound to the spreadsheet.
Border radius — applies corner rounding to the component border. This can be bound to the spreadsheet.
Default state
Each of these properties needs to be checked to take effect.
Button Colour — adjusts the default button colour. This can be bound to the spreadsheet.
Opacity — adjusts the default button opacity. This can be bound to the spreadsheet.
Border Colour — adjusts the default border colour. This can be bound to the spreadsheet.
Opacity — adjusts the default border opacity. This can be bound to the spreadsheet.
Hover state
Each of these properties needs to be checked to take effect. These can be disabled to inherit from the default styling options above.
Button Colour — adjusts the hover state button colour. This can be bound to the spreadsheet.
Opacity — adjusts the hover state button opacity. This can be bound to the spreadsheet.
Border Colour — adjusts the hover state border colour. This can be bound to the spreadsheet.
Opacity — adjusts the hover state border opacity. This can be bound to the spreadsheet.
Font Colour — adjusts the hover state text colour. This can be bound to the spreadsheet.
Opacity — adjusts the hover state text colour opacity. This can be bound to the spreadsheet.
Pressed state
Each of these properties needs to be checked to take effect. These can be disabled to inherit from the default styling options above.
Button Colour — adjusts the pressed state button colour. This can be bound to the spreadsheet.
Opacity — adjusts the pressed state button opacity. This can be bound to the spreadsheet.
Border Colour — adjusts the pressed state border colour. This can be bound to the spreadsheet.
Opacity — adjusts the pressed state border opacity. This can be bound to the spreadsheet.
Font Colour — adjusts the pressed state text colour. This can be bound to the spreadsheet.
Opacity — adjusts the pressed state text colour opacity. This can be bound to the spreadsheet.
Note: This guide does not cover the dynamic visibility properties, as these are common to all visible components. A separate guide on dynamic visibility can be found here.
Last updated
Was this helpful?