Sections / Tables
Last updated
Last updated
Sections could be used to show dynamic repeatable items usually to fill Table data with multiple columns.
For each section item and property passed during document generation service will automatically add additional rows to sheet and shift all the cell content down below the section cell.
It is not always easy to build formulas that refer to all cells in a table—such as summing all rows—when the exact number of rows or columns is not known in advance.
Best Practices for Using Tables with Placeholders in Templates
Place the table at the end of the sheet: To avoid layout issues, insert the table as the last (or only) element on a worksheet. This ensures that any dynamic expansion caused by placeholder data won't overwrite other content.
Use formulas with a buffer range: When referencing table data in formulas, include a generously sized range (e.g., A2:A1000
), assuming that the actual data will not exceed this limit. This helps accommodate varying table sizes without needing to update formulas.
Use named Excel tables: Define your tables using Excel’s Insert Table feature. When a placeholder inside a named table expands rows or columns, the table range automatically updates to include the new data.
Reference table data using structured references: Take advantage of structured table references in formulas (e.g., =SUM(TableName[ColumnName])
) to dynamically refer to entire columns, even as the table grows or shrinks.
If you have just one table/section in your document template you can use shorter placeholder definition. If you skip section name it will be assumed as "Items"