...
- In Microsoft Excel, open an Office Open XML (.xlsx) spreadsheet to use as a template.
!open1.png!
# - In the template worksheet, create a data marker row containing the fields you wish to bind to the template. In this case, a (hide) data marker modifier is added to the %%=Data.Region data marker so the grouping values are not repeated for every row of data. Additionally, several of the cells of this row have formulas that references cells within the row.
!datamarkers1.png!
- # In a row above the field by which you wish to group, insert a %%group marker to indicate that you are grouping by that field, in this case the Data.Region field.
!group1.png!
# - In the cell directly below the one containing the new %%group marker, place a %%header marker to indicate the beginning of the header rows.
!header1.png!
- # In the rows between the %%header marker and your data marker row, put content that you wish to see repeated each time there is a new value in the grouping field. In this spreadsheet, the value of the Data.Region is in the header above the rows associated with that region.
!headerrow1.png!
- # In the cell directly underneath the grouping field, place a %%footer marker to indicate the beginning of the footer rows.
!footer1.png!
- # In the rows under the %%footer marker, put content that you wish to see repeated each time there is a new value in the grouping field. In this case, a subtotal row calculates subtotals for each group.
!footerrow1.png!
# - Under the footer rows, place an %%endgroup marker to indicate the end of the grouping block.
!endgroup1.png!
Input Data
Generally, there are few changes that need to be made to data to use ExcelTemplate's Grouping and Nesting functionality. There are some guidelines, however, that you must follow when setting up your data source:
...