<< Click to Display Table of Contents >> Creating an Excel template |
To create an Excel template follow the next steps:
1. Open Mircrosoft Office Excel and create a new spreadsheet. Give it the required format by changing the font, font size, cells format, margins, formulas etc, according to your design.
The format of your spreadsheet can include titles, subtitles, tables, images, formulas etc. Additionally you can include as many sheets as required.
For example, to create an Invoice template in Excel we need the Customer's information and a table to show the Products purchased.
2. Reference the information that will be dynamically obtained from the Bizagi data model.
Remember that the information to be retrieved must be specified as Template Tags for example., [AttributeName]. This will allow obtaining the information from the data model of the Process.
For example, the Customer name is referenced with the [CustomerName] Template Tag.
To make reference to a collection you must use the following tags:
[Foreach:CollectionName]: Indicates the starting point of the Products collection.
[AttributeName]: All attributes between the Foreach and the End tag must belong to the collection.
[End]: Indicates the end of the Products collection.
Note in the image above how the Products collection is referenced by using the [Foreach:Products] sentence. All the tags typed from this tag until the [End] tag are assumed to be attributes of this collection. ([Product],[Quantity],[Price])
•The attribute and collection names can be different to the names given in the data model. This is only a reference to be used when mapping the information. •Tags cannot contain spaces. •Every single tag for the columns of all collection MUST be different from each other. No two columns in a document can be called the same way, even if they are in different tables. •When using Foreach and End tags or phrases be sure to capitalize them as specified. Otherwise, it will not be possible to identify the starting or ending point of the collection. |
3. Include the required formulas.
Suppose that our Invoice need the total price to be automatically calculated as the product of the quantity by the unitprice for each row, so a formula in the Total price cell can be used for this purpose.
•When generated, all formulas included in excel templates will be recalculated. |
4. Save your template.
Once you have defined the desired format and document body, save the book as a standard Excel Book. (.xlsx).
Last Updated 7/14/2023 11:56:52 AM