The DynamicDocs Excel Add-in provides a quick way to create bespoke pdf documents directly from Excel.
This is done by integrating with DynamicDocs API. The Add-in allows Excel users to format data into JSON payload and then directly call the API using custom functions and buttons in the Add-in ribbon. The successfully created documents are then downloaded into the user specified folder.
The DynamicDocs Excel Add-in will be available for download shortly.
To install the DynamicDocs Excel Add-in simply click on the installation file and follow the prompts.
In this section we will describe how the user can create the JSON payload for the API call using the built-in functions in the Add-in.
In some instance the user will have to indicate the type of data to be used in the JSON. When working with dates this is especially important. The JsonType built in function assists in creating 5 JSON types mainly: String, Date, Integer, Decimal and Boolean.
To create the actual JSON you have two functions namely: JsonConvert and JsonConvertWithSeparateHeader.
With JsonConvert you can simply select a table where the first line is the JSON type, the second line are the JSON object headers and the rest of the lines contain the JSON object values. This function will attempt to construct the data and formulate it into JSON format.
In an instance where the object headers and object values are in a different places, the JsonConvertWithSeparateHeader function comes in handy with two separate inputs.
Using the two functions above you will be able to formulate different parts of the JSON payload. The JsonCombine functions allows to create one JSON which combines the outputs of previous functions. This is useful when the data sits in different parts of the spreadsheet.
Once we have created our JSON payload. We are ready to call the DynamicDocs API from Excel. In this section we will explain what information you will need to do exactly this task. First, lets look at the 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. Please consult the authentication guide for information on where to retrieve the API key.
Note that in the settings you can also select a folder where you want your PDF documents to be saved. The default location is the Downloads folder.
You are finally ready to create the API call and generate a PDF. To do this you can use the DynamicDocsApiCall function which takes two required inputs, namely: the template token to identify which template to use and the JSON payload which you created previously.
Once the function is set up, simply click Make API Calls button at the top of the DynamicDocs ribbon and watch the function perform the API call. Your newly created document will be downloaded into the specified folder.