Table of Contents | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Principles of Operation
The Excel Channel renders supported nodes from the abstract report by copying cell patterns from the Excel template(s) and “stamping” them on the Excel report:
Cell The cell style is taken from the template.
Cell context The cell value is taken from data in the report.
Unsupported nodes are silently ignored, thus a report intended for Word or online should always (at least partially) be convertible to an Excel document.
...
The style of the pattern cells is copied to the next rows (or columns for generic tables) in the Excel report. This includes format, font, row height and column width, alignment, wrapping, colors, conditional formatting, merging, etc.
The content value of the pattern cells is evaluated, then copied. All
${...}
expressions in the content value will be treated as JavaScript expressions on report specificdata
. The expression can access the following identifiers:
...
Pattern Name | Description | Optional | Example Data | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rows at the top of a worksheet. Content Value data is taken from the node creating the new worksheet and the report:
| ✔️ |
| ||||||||||
| Rows at the bottom of a worksheet. Content Value data is the same as for | ✔️ | As for | ||||||||||
| Cells stamped when an issue is encountered (e.g. a missing mandatory pattern). Content Value data is the issue:
| ❌ |
|
...
For all supported nodes, the following parameters are considered:
Parameter | Description | Content Example | |||||
---|---|---|---|---|---|---|---|
| The style to apply. Used as name prefix when looking for cell patterns, see https://bmpi.atlassian.net/wiki/spaces/CRDOC/pages/3252125697/Working+with+Excel+Templates#Style-and-Language-Specific-Cell-Patterns. |
| |||||
| Whether this node should be rendered at the top of a new worksheet. |
| |||||
| The name of the worksheet if this node creates a new worksheet, i.e. it is the first node or has Note that Excel limits the length of worksheet names to 31 characters. |
|
...
Pattern Name | Description | Optional | Content Example Data | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Row(s) to be stamped for the column headers of the table, repeated if
| ❌ |
| ||||||||||
| Row(s) to be stamped for each data row in the table. A different cell pattern must be specified for each row importance ( Content Value data are the table facts by column id:
| ❌ |
| ||||||||||
| Row(s) to be stamped for each row group carrying a name. Content Value data is the group name:
| ❌ |
| ||||||||||
| Rows to be stamped before the column headers, repeated if | ✔️ | See | ||||||||||
| Row to be stamped after the last table row. Content Value data is the same as for | ✔️ | See |
...
If there is no columnHeaders
pattern, a VerticalTableNode
is rendered in a generic way. This mode of rendering is similar to the Word Channel: each column is rendered individually, depending on its value type. Typical value types are text
, amount
, count
, date
. The basic idea is that the style of a column (particularly format and alignment) depends on its value type.
Info |
---|
Pattern names containing a value type with a hyphen ('-') need to be written with a underscore ('_') instead (e.g. p-abs is written as p_abs in the template). |
Column related pattern names therefore contain the value type:
Pattern Name | Description | Optional | Content Example Data | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Row(s) and column(s) to be stamped for the column headers. A different cell pattern must be specified for each value type ( Repeated if Content Value data is the header text:
| ❌ |
| ||||||||||
| Row(s) and column(s) to be to be stamped for each fact in the table. A different cell pattern must be specified for each value type ( Content Value data is the fact value:
| ❌ |
| ||||||||||
| Row(s) and column(s) to be stamped for the row name, if set. Content Value data is the row name:
| ❌ |
| ||||||||||
| ❌ | See above. | |||||||||||
| ✔️ | See | |||||||||||
| ✔️ | See |
Note |
---|
Generic tables can only be rendered if there is no matching |
...
Pattern Name | Description | Optional | Example Data | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rows to be stamped for a section. Content Value data is taken from the node:
| ❌ |
|
...
Pattern Name | Description | Optional | Example Data | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rows to be stamped for a paragraph. Content Value data is taken from the node:
| ❌ |
|
...
A DataNode
renders the contents of its data object. It can be used to render arbitrary content data to the Excel document, as the type of the data object itself is user defined. This allows to render relatively complex objects into a large cell pattern.
Pattern Name | Description | Optional | Example Data | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rows to be stamped for the data object. Content Value data is taken from the node:
If the data is an array, the pattern is stamped for each array element. | ❌ |
|
...
Pattern Name | Description | Optional | Example Data | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rows to be stamped for an error. Content Value data is taken from the node:
| ❌ |
|
...
If the report parameter addExcelTrace
to is true
, the rendering process is traced for each pattern, and the trace appended to the Excel document as worksheet "Pattern Usage Trace".
...