How to create Tables
Last updated
Last updated
Designing tables in Documint is relatively simple but here are some tips for the best ways to get great-looking, well-aligned tables in your documents.
When designing a table, whether static or dynamic, there are some things to consider. The image below shows the structure you should try and follow when creating your tables, for best results.
To ensure that your data all lines up and avoid any misalignment that might happen if data is missing, you should ensure that you arrange the line items of your tables in rows, then add columns inside each row, this will ensure everything stays locked to the row it relates to. Below are some walk-through examples of how to create both static and dynamic tables.
A static table is a table whose number of rows and columns does not change.
Add your header row
Add more columns to that row, if needed
Add your static text and style as you would like for font, colour, borders and corners
Add another row for the data
Add more columns to that row, if needed
Add your static text, style as you would like for font, colour, borders and corners
Copy your first data row to quickly add as many rows as you need and adjust the static text
A dynamic table is a table whose number of rows or columns changes based on the data merged with the template. A common example of this is a line items list in an invoice.
Add your header row
Add more columns to that row, if needed
Add your static text and {{variables}} and style as you would like for font, colour, borders and corners.
Add another row for the data
Add columns to that row
Add your static text and {{variables}}, style as you would like for font, colour, borders and corners
Add repeating/looping to this row so that Documint will then create as many line items as you need in the table, based on the amount of data that there is in the output
Set this data row to 'Avoid page breaks' to ensure your line items flow nicely onto the next page if necessary
NOTE: Normally, dynamic tables will only have a header and a single row for your data, set in the template. The single data row is then looped over to create a dynamic table with as many line items appearing in the output as required. Learn more about looping here