PDF & PowerPoint Generator

This article outlines how to use the PDF & PowerPoint Generator add-on, its properties and generating an external output from Squirrel projects.

The PDF & PowerPoint Generator add-on is currently not publically available on the Squirrel Marketplace. If you are interested, or for more information, please get in touch.

As a means of generating highly visual and dynamic static outputs, the Squirrel team generated the PDF & PowerPoint Generator add-on. Taking a created PPT Template and uploading it to the Squirrel Cloud, unique PDF, and PowerPoint outputs can be created, tailored to each use-case of your published projects.

Creating your PowerPoint template

The add-on works by taking a previously created PowerPoint document, and outputting the generated data within the project into a PDF or back into PowerPoint.

The initial template is simply a means of controlling the output's properties, including styling, layout, branding, and other static text areas.

See the example below:

Uploading your PowerPoint Template to the Squirrel Cloud

For the add-on to connect to your template and generate an output, you will need to upload your PowerPoint to the Squirrel Cloud.

  1. Login to your Squirrel account at https://cloud.squirrel365.io/account/login

  2. Navigate to the 'External Documents' tab on the left-side panel

  3. Select 'Add New File' in the top-left corner and upload your PowerPoint file

Once uploaded, your screen will look like this:

  1. Click 'Back' at the top-left corner. You will return to the main 'External Documents' page, where all your uploaded PowerPoint files are listed.

Here you will see two keys - The API key, and the GUID key. These allow the add-on to connect to the template output.

Make sure to have the correct keys and files to connect to the Squirrel Cloud. If these are incorrect, the output generation will fail. Always verify that the keys haven't changed with every template upload or update, as this will affect the generator.

Now to get the add-on wired up...

Connecting the add-on to the template

  1. In Squirrel, place the PDF & PowerPoint Generator add-on on the canvas. It can be found under the Add-ons menu on the left-hand panel.

Once placed, the properties panel will populate.

  1. Under the GENERAL properties, you will see the following:

  1. Back in the 'External Documents' page of your Squirrel account, select the 'copy to clipboard' icons beside both the API and GUID keys. Paste them in the respective properties above.

You can also put these keys in a spreadsheet and link the properties to them. This way, if you ever need to update them, you can simply update the keys in the spreadsheet without having to find the add-on to make the updates.

  1. Enter a 'Generated filename' - this will be the name of the project once it is outputted.

  2. (Optional) Bind the 'Status message' property to the spreadsheet. This will input information and updates into the spreadsheet, letting the user know of the generation progress, or if there are any issues.

  3. Select the desired 'Exported file format'. This can be either a PowerPoint or a PDF.

Connecting the replacement data

A big part of the PDF & PowerPoint Generator is taking data from Squirrel, such as calculations, tables, images, and results, and pushing it into a connected template. However, there is quite a bit of preparation that needs to be done before the template is ready to receive that data.

1. Utilise 'unique identifiers' in the template

As seen earlier in this article, the PowerPoint template should have been prepared with what we call 'unique identifiers'. These are values, surrounded by {{ double curly brackets }} which are identifiable by the add-on.

The term 'unique' is used because each value must be distinct to avoid duplicating values in the output. The only scenario where a 'unique identifier' is used in multiple places is when it is meant to return the same value.

While these 'identifiers' must be different, they do not need to be wildly different. For example, if you want to display two results that are from the same area in the project, they can be as follows:

{{result_1}}

{{result_2}}

Having the '1' and '2' is enough for the add-on to distinguish between them.

It's possible to list all the values as result_1, result_2, and so on, but it's better to use keywords or abbreviations to easily identify their source.

When dealing with numerous identifiers, it can be confusing if they all look too similar, especially when dealing with multiple of these values.

2. Create a new sheet specifically for the outputted values

As a tip, we recommend creating a new sheet in the Squirrel spreadsheet that will specifically contain the data for the output. This ensures that everything is organized, and it is not required to navigate across the sheet to make any alterations.

  1. Create a new sheet and label it clearly as the PDF/ PowerPoint output values

  2. Back in your Squirrel Cloud account, navigate to the uploaded template, and select it to open

  3. In the list of found 'unique identifiers', select the 'copy to clipboard' icon and paste it within the Squirrel spreadsheet

Section each of the values according to the associated area in the project to easily keep track.

3. Use the correct value format

For the data to be pushed into the output correctly, it must be in Text format. This means any value that is formatted as currency, percentage, DateTime, etc will return its numerical value and will have no formatting applied.

We recommend using the TEXT() formula to reference any value that is to be bound to the add-on, e.g.

$3.50 in cell A1 of 'Sheet 1' sheet

TEXT('Sheet 1'!A1,"$#.00") in cell B2 of 'OutputValues' sheet

This will display the original value as though it was still in its currency format but will be read as text.

If this step is missed, the value could come through as a numerical value leaving out the '$' dollar sign.

4. Know the types of 'Replacements'

Under the TEMPLATE REPLACEMENTS properties in Squirrel, you will notice multiple different types of template replacements. They all utilize the same 'unique identifiers', but in different ways.

For each 'Replacement' time to be active, you need to check the checkbox beside each of the property dropdowns. These are unchecked by default.

SINGLE VALUES

The simplest form of value replacement. These values can be identified standing alone in a text box, or within a sentence, e.g.

IMAGES

Images can be updated by placing the 'unique identifier' within the ALT text of the image. In Squirrel, this will be bound to a cell containing an image URL.

Images will be adjusted to match the size of the original image within the template. Ensure the 'Lock aspect ratio' option is set within PowerPoint to ensure the new image is not distorted if it is not the same size as the original.

CHARTS

Charts can be updated by placing the 'unique identifier' within the ALT text of the chart. This will be bound to a range in the Squirrel spreadsheet.

TABLES

Tables can be updated by placing the 'unique identifier' within the ALT text of the table. This will be bound to a range in the Squirrel spreadsheet.

SHAPES

Shapes can be updated by placing the 'unique identifier' within the ALT text of the shape. This will be bound to a 'Fill Color' and 'Outline Color'. There is also an option to 'remove' the shape if the condition is met.

You cannot change the chosen Shape in the template, just its color properties.

LINES

Line components can be updated by placing the 'unique identifier' within the ALT text of the Line. This will be bound to a 'Line Color'. There is also an option to 'remove' the Line if the condition is met.

REMOVE SLIDES

The PDF & PowerPoint Generator also can remove certain slides from the output. This could be done in instances where certain slides are not required as part of the end report.

To do this:

  1. Enter a comma-delimited list into the 'Remove Slides' input, defining the slides to remove.

  2. Bind the 'Remove Slides' input to a cell containing the comma-delimited list

Binding the property enables more dynamic control over which slides are removed. For example, this might involve a cell containing a concatenated list of slides to remove based on previous project inputs.

Styling the Component

As with all components in Squirrel, the PDF & Powerpoint Generator buttons can be styled to match the project, or your branding. These are the styling properties:

GENERAL STYLING

  • Generate PPTX text - this property defines the default text displayed on the button before interaction. This property can be bound to the spreadsheet.

  • Generating PPTX text - this property defines the text displayed on the button once it has been selected. This property can be bound to the spreadsheet.

FONT

  • Font - Choose a font style from the dropdown list

  • Size - Change the font size of the label in 3 ways:

    • Using the spinner buttons

    • Typing in a value

    • Binding to a value in a spreadsheet cell

  • BIU - Use these toggle buttons (bold, italic, underline) to change the format of the Text Label. When toggled on, the button is blue:

  • Text Color - The input text will be shown in the color that matches the value entered in the property field.

  • Opacity - This determines the transparency of the input text.

  • Text Alignment - Choose to align the text to the left, right, or center. The blue button indicates the current selection:

  • Capitalization - Change the letter case of the label text content to either uppercase first letter, all uppercase letters, or all lowercase. Unselecting all of the buttons will return the content to its original case format.

BORDER

  • Border weight - Adjusts the weight of the component border. This can be bound to the spreadsheet.

  • Border radius - Applies corner rounding the the component border. This can be bound to the spreadsheet.

DEFAULT STATE

Each of these properties needs to be checked to take effect.

  • Button Color - adjusts the default button color. This can be bound to the spreadsheet.

    • Opacity - adjusts the default button opacity. This can be bound to the spreadsheet.

  • Border Color - adjusts the default button border color. This can be bound to the spreadsheet.

    • Opacity - adjusts the default button 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 their properties from the default styling options above.

  • Button Color - adjusts the hover state button color. This can be bound to the spreadsheet.

    • Opacity - adjusts the hover state button opacity. This can be bound to the spreadsheet.

  • Border Color - adjusts the hover state button border color. This can be bound to the spreadsheet.

    • Opacity - adjusts the hover state button border opacity. This can be bound to the spreadsheet.

  • Font Color - adjusts the hover state text color. This can be bound to the spreadsheet.

    • Opacity - adjusts the hover state text color 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 their properties from the default styling options above.

  • Button Color - adjusts the pressed state button color. This can be bound to the spreadsheet.

    • Opacity - adjusts the pressed state button opacity. This can be bound to the spreadsheet.

  • Border Color - adjusts the pressed state button border color. This can be bound to the spreadsheet.

    • Opacity - adjusts the pressed state button border opacity. This can be bound to the spreadsheet.

  • Font Color - adjusts the pressed state text color. This can be bound to the spreadsheet.

    • Opacity - adjusts the pressed state text color opacity. This can be bound to the spreadsheet.

This guide will not describe the dynamic visibility properties as these are generic to each visible component; a separate guide and tutorial on dynamic visibility can be found here.

Last updated

Logo

Copyright © 2019 - 2024 InfoSol Ltd. All rights reserved.