This is the reference page of all the elements you can use in Maven Documents Template Builder for the XLSX file. For every element, you can check out basic information about it, the full list of its attributes, and the following specifications:
There are also basic attributes that every element has:
Attribute Name | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
name | string | Name of the element. | false | - | false |
hidden | picklist | Determines if the element is visible. | false | - | true |
The Expression column indicates whether an expression can be used as an attribute value.
An iteration component that allows you to output the contents of a collection according to a structure that you specify because the whole body of the Repeater element will be shown for every record in the collection. This element can have other elements like Code, Image, or even another Repeater nested inside.
There are two types of Repeater available in Template Builder in Microsoft Excel: Vertical Repeater and Horizontal Repeater. The type of the Repeater is specified in the Direction attribute.
Vertical Repeater repeats rows enclosed by the mdoc:repeater tag. The starting column is the one where the Repeater tag is inserted and the end column is the one defined under the lastCell attribute. If there is no value provided, the end column will be set as the last column in an Excel sheet. An example of the vertical repeater is shown below.
Horizontal repeater repeats columns enclosed by the mdoc:repeater tag. The starting row is the one where the Repeater tag is inserted and the end row is the one defined under the lastCell attribute. If no value is provided, then the end row will be set to the last row in an Excel sheet.
Attribute Name | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
value | picklist | Collection of records to use in the repeater. | true | - | false |
variable | string | The current record in the iteration. | true | - | false |
Direction | picklist | Determines the direction of the Repeater. It could be either horizontal or vertical. | false | Horizontal | false |
Last Cell | string | Depending on the direction of the Repeater it could be either the letter of the column or the number of the row. | false | - | true |
Notice the '#' (hashtag) used. It wraps around the oli Variable referenced inside Vertical Repeater.
Vertical Repeater above will generate a table like this one:
Now let's look at the example of equivalent Horizontal Repeater:
It will generate a table like this one:
There is also a possibility to use Index Expression inside the Repeater. This expression returns the index of the repeating Variable inside the Repeater.
This element allows you to render an image from the specified URL or use base64 data.
Attribute Name | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
source | picklist | Allows to select the merge field that holds base64 data or the URL of the image. | true | - | true |
width | integer | Width of the image in pixels. | false | - | true |
height | integer | Height of the image in pixels. | false | - | true |
insideCell | boolean | Determines if an image will wrap inside a cell. | false | false | true |
mode | picklist | Available only if Inside Cell is true. Determines the sizing mode for the image. | false | 1 | true |
Mode attribute can have one of the following values:
Note that no mode causes the cell to be resized to fit the image. The default value for Mode is 1, however, if height and width are specified then the default value is 4.
Here we have a few different examples of different usage for the mdoc:image element:
Here is an example of the created document:
You can also use the Image element to place charts into the document. Here is a tip on how to do it.
Renders different codes (QR Codes, Barcodes, etc.) on the document.
Attribute Name | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
type | picklist | Code type. | true | - | true |
value | picklist | Allows to select the merge field that holds a textual value that will be replaced with the code image. | true | - | true |
scale | integer | A scale of the rendered code. Must be integer > 0. | false | - | true |
rotate | picklist | The list of available options which define the rotation of the code image to one of the four orthogonal orientations. | false | N | true |
includeText | Boolean | Displays the text below the code for some code types (e.g. code128). | false | false | true |
insideCell | boolean | Determines if the image will wrap inside a cell. | false | false | true |
mode | picklist | Available only if Inside Cell is true. Determines the sizing mode for the image. | false | 1 | true |
Mode and insideCell behave the same as in the Image element.
Here are a few examples of the mdoc:code element:
Here is the result file:
This element removes or hides rows in the Sheet in which the element is located.
Attribute Name | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
hidden | picklist | Defines if the row will be removed. | false | - | true |
collapse only | boolean | Defines if the row will only be hidden not removed. | false | false | true |
Keep in mind that the Hidden attribute here has a different meaning from the one we mentioned at the beginning of this page. This Hidden attribute references if the row (column) will be removed, but the elements themselves.
Column is similar to the Row element. The only difference is that this element hides the columns of the Sheet in which the element is located.
Attribute Name | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
hidden | picklist | Defines if the row will be removed. | false | - | true |
collapse only | boolean | Defines if the row will only be hidden not removed. | false | false | true |
The example includes the Row and Column elements as they are similar in definition.
So the provided element removes the selected column...
...and the element below only hides the defined row.
This element removes the sheet where the element is located from the Excel book.
Attribute Name | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
hidden | picklist | Defines whether the sheet will be removed. | false | - | true |
Keep in mind that the Hidden attribute here has a different meaning from the one we mentioned at the beginning of this page. This Hidden attribute references if the whole sheet is to be removed, not the element itself.
So here's what the element looks like in the sheet.
Once the document is generated, the sheet is removed from the book.
If the element, resulting in "true" is inserted in the only sheet in the book, the generation of such a document will end up in error.
With this element, you can insert particular sheets from another Excel book or the whole book into the Excel file you are building.
You can define the file from which you need to take data in the following ways:
Attribute Name | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
source type | picklist | Provides a choice of the content type. | true | - | false |
source | picklist | Provides a list of available templates or merge fields that can hold the needed file's data. | true | - | false |
sheet | text | Allows to define the name of the particular sheet from the selected file to be inserted. | false | - | false |
The Include element below will insert the content of the sheet called Sheet1 from your XLSX Online Document Template into the template you are working on.
In the following example, we include the whole content of the XLSX file defined in the selected merge field value.
Here are some important things to consider: