Generate Excel files with repeating rows
Before you start
Use an Excel template when the result is a table: every line of a purchase order, every invoice of a vendor. You design the workbook in Excel, mark where values go, and a workflow produces an .xlsx and attaches it to the record.
Lay out the workbook
Section titled “Lay out the workbook”Build the sheet as you want to see it: titles, headers, number formats and column widths. Then add two kinds of placeholder.
Single values. Type a field’s system name inside ${ } in any cell, for example ${vendor_name} or ${po_number}. Give the whole placeholder one formatting so it is filled.
A repeating row. In one row, put placeholders written as the list name, a dot and the field.
| Item | Quantity | Unit price |
|---|---|---|
${lines.item} | ${lines.quantity} | ${lines.unit_price} |
Beezr copies that row for every record in the list and removes it when the list is empty. For a module with line items, the Fields tab shows the list name and copies each placeholder for you.
Create the template
Section titled “Create the template”- In the left rail, click Document generation, then New template.
- Choose Excel, type the Name, for example
PO lines, and choose the Module. Click Continue. - Drop the
.xlsxon Drop your Excel file here, or click it to browse. - Click Save.
Use an .xlsx file . After saving, Placeholders found lists each placeholder as a Value or a Repeating row, and where it will be filled from.
Beezr reads the file when you save it. If you change the workbook later, click Replace and Save again.
Fill it from a workflow
Section titled “Fill it from a workflow”In the workflow, add a Smart document step on the same module and choose the template. For a repeating row, the step asks you to Choose a list, one of the lists made earlier in the workflow, such as the records a Load data step returned. “Every row of the list prints, one per table row.” Single values take a field or a Smart Script. Smart document covers the step.
What did I get?
Section titled “What did I get?”An Excel template tied to a module. The workflow’s file keeps your layout, shows the single values and has one row for each record in the list. It is attached to the record that started the workflow.
Check yourself
What's next
Last checked