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.
Follow these link to the documentation on getting started and authentication guide for the DynamicDocs API.
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.
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.
To enable the add-in follow these steps in Excel:
To disable the add-in follow these steps in Excel:
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.
The following is a list of functions and their brief descriptions which are available in the DynamicDocs Excel Add-in.
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.
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:
The JsonConvertWithLookUpV2 function allows the user to select specific data values from a table based on a specified look up value.
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:
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.
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:
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.
Consider the following JSON strings situated in the Data sheet.
The above JSON can be combined using the JsonCombine function in another sheet:
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.
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.
Please refer to the authentication guide for information on how to retrieve the API key.
The JSON payload can be viewed by selecting the cell with JSON string and clicking View JSON in the DynamicDocs ribbon.
This will open up the JSON Viewer window allowing the user to examine the JSON payload.
In order to create the API call and generate a PDF, you can use the DynamicDocsApiCall function. This function requires two necessary inputs, namely:
The additional inputs are optional. Thereafter, to make the api call, locate the Make API Calls ribbon found in the DynamicDocs 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.
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.
Upon a successful API call, the PDF document will be generated and stored in the Default Save Location folder, as specified by the user.