Template configuration includes all the features, fields and properties of Templates in DsExcel.
The first step to configure a template is to create a template layout in Excel, which is a pre requisite to generate Excel reports. This layout defines the outline of how the final report will look like and can include static text, data bound fields and other template properties.
Except static fields, all other fields follow syntax and are defined in mustache braces {{ }}. These fields can also include template properties like group, sort, pagebreak etc which are applied on the final Excel report when populated from the data, in datasource.
Apart from static text, a template layout in Excel is comprised of:
Note: The Excel formulas applied in template layout can be exported as formulas in Excel reports instead of just the cell values. The formula and its range can be viewed in the formula bar of Excel report by selecting the cell to which it has been applied. The Excel formula can be exported by using this syntax in template layout: {{= formula }}
For example:
Lets say, {{==SUM(A5)}} formula is applied in a template layout. Now, in the generated Excel, formula displayed on clicking the formula cell will be SUM(A5:A10), meaning that this is the range on which the formula is applied.
The formula must be syntactically correct and refer to the right range while defining in the template layout.
Templates, in DsExcel, also supports: