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.
Template
Output
Formulas
You can use formulas in your sheets that refer to individual cells or table columns using relative references or named table columns. Examples:
Formula example in dynamic table row with named table column reference
Formula example in regular dynamic row with relative reference
If you provide multiple products new rows will be added to spreadsheet, additionally:
The 'Cost with Tax' column with a formula will be copied to new rows, and the formula will automatically adjust to reflect the updated relative cell references (B4, B5, B6, etc.)
The 'Tax' column with a static value (along with any other cells containing content in the same row) will be copied to new rows as-is.
Formula for table data summaries
Use named tables to easily reference entire columns of dynamically populated table data in summary formulas.
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
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.
Optional Columns
If you use named tables with placeholders in the header and content cells, and no value is provided (or the value is empty), those columns will be skipped in the output document. The table range will be automatically adjusted accordingly.
Short Definition
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"