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 parameters.
The list of parameters differs from element to element. However, there are basic parameters common to every element:
Parameter | Type | Description | isRequired | Default Value | Expression |
---|---|---|---|---|---|
name | string | Name of the element. | true | - | false |
hidden | boolean | Determines whether the element is visible or hidden. | false | false | true |
The "Expression" column indicates whether an Expression can be used as that parameter's value.
Basic information contains the description of the element and covers the following qualities:
selfClosing
. Represents whether an element is closed immediately, as opposed to standard HTML tags, which have both an opening and closing tag.The iteration component outputs the content of a collection according to a structure that you specify. The whole body of the "Repeater" element is shown for every record in the collection. This element can nest other elements such as a Table, a Paragraph, or an Image inside.
There are two types of the Repeater available in Template Builder in Microsoft Excel:
The Repeater's type is specified in the "Direction" parameter.
Parameter | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
value | string | Collection of records to use in the Repeater. | true | - | true |
variable | string | The current record in the iteration. | true | - | false |
direction | string | The direction of the Repeater. Available values: vertical , horizontal . |
false | horizontal | false |
lastCell | 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 |
Vertical Repeater in the document looks like the following:
The hash "#" symbol is used to wrap around the "oli" Variable referenced inside Vertical Repeater.
The outcome of the Repeater from above:
The example of the equivalent Horizontal Repeater:
It generates the following table:
You can use the "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 base64 data.
Parameter | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
source | string | The merge field that holds base64 data or the URL of the image. Or the URL/base64 data of the image itself. | 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 whether the image fits inside a cell. | false | false | true |
mode | integer | Determines the sizing mode for the image. Available only if Inside Cell is true. Available values: 1 , 2 , 3 , 4 . |
false | 1 | true |
The "Mode" parameter can have one of the following values:
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 the "Image" element:
Here is the outcome in the generated document:
You can use the "Image" element to place charts into the document. Here is a tip on how to do it.
Renders various types of codes such as QR Codes, Barcodes, etc.
Parameter | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
type | string | Code type. | true | - | true |
value | string | The merge field holds a value that is replaced with the code image. | true | - | true |
scale | integer | The scale of the rendered code. Must be an integer > 0. | false | 2 | true |
rotate | string | Defines the rotation of the code image to one of the four orthogonal orientations. Available values: N , R , L , I . |
false | N | true |
includeText | boolean | Displays 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 | integer | Determines the sizing mode for the image. Available only if Inside Cell is true. Available values: 1 , 2 , 3 , 4 . |
false | 1 | true |
Rotation values:
Mode and insideCell behave the same as in the "Image" element.
Here are a few examples of the "Code" element:
Here is the rendered document:
This element removes or hides rows in the Sheet where the element is located.
Parameter | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
collapse only | boolean | Defines whether the row is collapsed or removed. | false | false | true |
hidden | boolean | Defines whether the row is hidden. | false | - | true |
The Hidden attribute here has a different meaning from the one we mentioned at the beginning of this page. This "Hidden" parameter defines if the row is removed, but not the element itself.
The Column is similar to the "Row" element. The only difference is that this element removes or hides the columns in the Sheet where the element is located.
Parameter | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
collapse only | boolean | Defines whether the row is collapsed or removed. | false | false | true |
hidden | boolean | Defines whether the row is hidden. | false | - | true |
The Hidden attribute here has a different meaning from the one we mentioned at the beginning of this page. This "Hidden" parameter defines if the row is removed, but not the element itself.
The example includes the "Row" and "Column" elements as they are similar in definition.
The provided element removes the selected column.
The element below only hides the defined row.
This element removes the sheet with the element from the Excel book.
Parameter | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
hidden | boolean | Defines whether the sheet is removed. | false | - | true |
The Hidden attribute here has a different meaning from the one we mentioned at the beginning of this page. This "Hidden" parameter defines whether the sheet is removed, not the element itself.
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 fails.
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:
Parameter | Type | Description | Required | Default Value | Expression |
---|---|---|---|---|---|
sourceType | string | Type of the source document. Available values: documentTemplate , salesforceFile . |
true | - | false |
source | string | A list of available Document Templates or merge fields that can hold the ID of the needed document as a value. | true | - | true |
sheet | string | Defines the name of the particular sheet insert. | false | - | true |
The "Include" element below inserts the content of the sheet called "Sheet1" from the "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
- Content of the included sheet overwrites data in the receiving sheet.
- When you insert a particular sheet, the name of the receiving sheet remains.
- When you insert the whole file, all its sheets are inserted, changing the sheet's name where the "Include" element is.
- When inserted sheets duplicate names of those from the receiving file, inserted ones will have the "(1)" suffix added to their names.