Overview

The DynamicDocs Excel Add-in provides a quick and effective approach to create bespoke PDF documents directly from Excel.

This is done via integration with the DynamicDocs API. The add-in enables Excel users to format data into JSON (JavaScript Object Notation). Thereafter, the user can directly call the API using custom functions and buttons in the add-in ribbon.

The successfully created documents are then downloaded into a user specified folder.

Quick Links - DynamicDocs API Documentation

Follow these link to the documentation on getting started and authentication guide for the DynamicDocs API.

Download and Setup

The DynamicDocs Excel Add-in is can be downloaded through the Excel to PDF Add-in Download page.

Note that the add-in is only available on specific paid plans. For further information visit DynamicDocs API pricing page.

Installation

To install the DynamicDocs Excel Add-In simply click on the installation file and follow the prompts.

In an event where the DynamicDocs tab has not been added to your Excel as shown in the image below, you will have to enable it.

DynamicDocs Excel Add-in Tab

Enable Add-in

To enable the add-in follow these steps in Excel:

  1. Open Microsoft Excel, click on File > Options. The following window will open:
  2. DynamicDocs Excel Add-in Tab
  3. Select Add-ins, Manage: Excel Add-ins > Go.
  4. Select the DynamicDocs Excel Add-In.
  5. DynamicDocs Excel Add-in Tab

Disable Add-in

To disable the add-in follow these steps in Excel:

  1. Open Microsoft Excel, click on File > Options.
  2. Select Add-ins, Manage: Excel Add-ins > Go
  3. DynamicDocs Excel Add-in Tab
  4. Deselect the DynamicDocs Excel Add-In
  5. DynamicDocs Excel Add-in Tab

Uninstall Add-in

To completely remove the Add-in, go to Windows System Settings > Add or remove programs, then locate the DynamicDocs Excel Add-in and click Uninstall.

List of DynamicDocs Add-in Functions

The following is a list of functions and their brief descriptions which are available in the DynamicDocs Excel Add-in.

  • Base64Encoding - Encodes an image to base 64.
  • Base64EncodingJSON - Encodes an image to base 64 and formats to JSON.
  • DataOrientation - Defines the different data orientation for the JSON functions.
  • EncryptionType - Defines the different encryption types.
  • JsonType - Defines the different JSON types.
  • JsonConvertV2 - Converts a series of Excel ranges to a JSON string.
  • JsonConvertWithLookUpV2 - Converts a series of Excel ranges to a JSON string with a lookup functionality.
  • JsonCombine - Combines a series of JSON strings into one.
  • DynamicDocsAPICall - Makes an API call to the DynamicDocs API.

JsonConvertV2 Function

Two functions are used for converting data into its subsequent JSON format, namely: JsonConvertV2 and JsonConvertWithLookUpV2 functions. Note that JsonConvert and JsonConvertWithLookUp functions are deprecated but available in the current version of the Add-in.

The JsonConvertV2 function allows the user to select a table consisting of the following parameters: JSON object headers, JSON object values, and the data orientation (default is “Horizontal”). This function will attempt to construct the data and formulate it into JSON format.

JsonConvertV2 Example

Consider the following spreadsheet example below containing invoice data and client details

Applying the JsonConvertV2 function to the table containing invoice data, outputs the following JSON string:

Similarly, if the JsonConvertV2 function is applied to the clientDetails table, the JSON string is formed as follows:

JsonConvertWithLookUpV2 Function

The JsonConvertWithLookUpV2 function allows the user to select specific data values from a table based on a specified look up value.

JsonConvertWithLookUpV2 Example

Consider the following invoiceDetails table in the image below:

Applying the JsonConvertWithLookUpV2 function to the above table in order to determine the invoice detail with an amount of 9600 yields the following JSON string:

JsonType Function

In certain instance, the user is required to indicate the type of data that needs to be used in the JSON. This is especially important when working with dates. The JsonType function assists in creating twelve available JSON types, i.e. String, Date, Integer, Decimal, Boolean, Object, StringArray, DateArray, IntegerArray, DecimalArray, BooleanArray and ObjectArray.

JsonType Example

Consider the following invoiceDetails table in the image below:

The user is required to specify the type of data needed to formulate the JSON. The invoiceNumber column contains decimal data. Subsequently, the data in column invoiceDate and invoiceDue is a date data type. Therefore, the function is applied above each column header as follows:

JsonCombine Function

Using the two aforementioned JSON functions, the user will be able to formulate different parts of the JSON payload. The JsonCombine function allows the user to create one JSON by combining the outputs of previous JSON functions. This is particularly useful when data is situated in different sheets of the spreadsheet.

JsonCombine Example

Consider the following JSON strings situated in the Data sheet.

The above JSON can be combined using the JsonCombine function in another sheet:

Getting ready to call DynamicDocs API from Excel

Once the JSON payload is created, the user may call the DynamicDocs API through Microsoft Excel. This section outlines the necessary steps required to perform this task.

Settings

To create API calls using the Add-in, you will have to open the settings menu and provide the Adv-Security-Token which is the API key of your account.

  1. Click on the DynamicDocs tab
  2. DynamicDocs Excel Add-in Tab
  3. Select Settings
  4. This will open the following window:
  5. DynamicDocs Excel Add-in Tab
  6. Enter your unique Adv-Security-Token, i.e., the API key of your account
  7. Select your own Default Save Location for your PDF documents. The default location is the local Downloads folder.
Quick Links - DynamicDocs API Documentation

Please refer to the authentication guide for information on how to retrieve the API key.

View JSON Payload

The JSON payload can be viewed by selecting the cell with JSON string and clicking View JSON in the DynamicDocs ribbon.

DynamicDocs Excel Add-in Tab

This will open up the JSON Viewer window allowing the user to examine the JSON payload.

DynamicDocs Excel Add-in Tab

DynamicDocsApiCall Function

In order to create the API call and generate a PDF, you can use the DynamicDocsApiCall function. This function requires two necessary inputs, namely:

  1. The template token to identify which template to generate
  2. The JSON payload created by the user

The additional inputs are optional. Thereafter, to make the api call, locate the Make API Calls ribbon found in the DynamicDocs tab.

DynamicDocs Excel Add-in Tab

The user has the option to make multiple API calls with all DynamicDocsApiCall functions found throughout any open spreadsheets using All button. Alternatively, the user can make a specific API call by selecting the active cell with the DynamicDocsApiCall function and clicking on Active Cell button.

DynamicDocs Excel Add-in Tab

Once the API call has been created, the user can view the progress of the document generation by selecting the Log command in the DynamicDocs ribbon.

DynamicDocs Excel Add-in Tab

Upon a successful API call, the PDF document will be generated and stored in the Default Save Location folder, as specified by the user.