Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

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:

...

Pattern Name

Description

Optional

Example Data

header

Rows at the top of a worksheet. Content data is taken from the node creating the new worksheet and the report:

Code Block
languagetypescript
data: {
  mainTitle?: string;
  subTitle?: string;
  reportName: string;
  params: object // Execution Parameters 
}

✔️

Code Block
languagejson
"data": {
  "mainTitle": "Rückforderbare Quellensteuern",
  "subTitle": "Vom 01.01.2024 bis 31.03.2024",
  "reportName": "Rückforderbare Quellensteuern",
  "params": {
    "portfolioId": "00001",
    "reportingDate": "2024-03-31",
    ...
  }

footer

Rows at the bottom of a worksheet. Content data is the same as for header.

✔️

As for header.

issue

Cell created Cells stamped when an issue is encountered (e.g. a missing mandatory pattern). Content data is the issue:

Code Block
languagetypescript
data: Issue

Code Block
languagejson
"data": {
  "id": "rep-2024-03-31-15-6",
  "description": "Cell pattern 'data' to stamp DataNode 'returns' not found",
  "severity": "error",
  "source": "rendering"
}

...

Column related pattern names therefore contain the value type:

Parameter

Description

Example

renderingOptions.excel.repeatHeaders

Mark tableHeader and columnHeaders to be repeated on each page (VerticalTableNode only).

If there are multiple VerticalTableNodes rendered into a single worksheet, only the headers of the last one with this option will be repeated.

Code Block
languagejson
"parameters": { "renderingOptions": { "excel": { "repeatHeaders": true } } }

Pattern Name

Description

Optional

Content Example

columnHeader.<valueType>
columnHeader

Row(s) and column(s) to be stamped for the column headers. A different cell pattern must be specified for each value type (columnHeader.text, columnHeader.amount etc.) used.

Repeated if renderingOptions.excel.repeatHeaders: true.

Content data is the header text:

Code Block
languagetypescript
data: { header: string }

Code Block
languagejson
"data": {
  "header": "Betrag"
}

fact.<valueType>.importance
fact.<importance>

Row(s) and column(s) to be to be stamped for each fact in the table. A different cell pattern should must be specified for each value type (fact.text.1, fact.amount.1 etc.) , and must be specified for each row importance (fact.text.1, fact.text.2 etc.) used.

Content data is the fact value:

Code Block
languagetypescript
data: { value: number | string | boolean | Date | null }

Code Block
languagejson
"data": {
  "value": 11424.3
}

rowName.<importance>

Row(s) and column(s) to be stamped for the row name, if set.

Content data is the row name:

Code Block
languagetypescript
data: { rowName: string }

Code Block
languagejson
"data": {
  "rowName": "Gebühren- und Zinsabrechnung"
}

rowGroup.<importance>

Same as []

See above.

tableHeader

✔️

See header.

tableFooter

✔️

See header.

Note

Generic tables can only be rendered if there is no columnHeaders pattern in any of the templates used (main template and configured templates). It is therefore a good idea to always prefix columnHeaders with a style if a template is also used for generic tables.

VerticalTableNode Parameters

Note

Generic tables can only be rendered if there is no columnHeaders pattern in any of the templates used (main template and configured templates). It is therefore a good idea to always prefix columnHeaders with a style if a template is also used for generic tables.

VerticalTableNode Parameters

Parameter

Description

Example

renderingOptions.excel.repeatHeaders

Mark tableHeader and columnHeaders to be repeated on each page (VerticalTableNode only).

If there are multiple VerticalTableNodes rendered into a single worksheet, only the headers of the last one with this option will be repeated.

Code Block
languagejson
"parameters": {
  "renderingOptions": {
    "excel": {
      "repeatHeaders": true
    }
  }
}

renderingOptions.excel.tableWidth

The total width (in Excel units, see e.g. https://learn.microsoft.com/en-us/office/troubleshoot/excel/determine-column-widths) of all columns of the generic table. This width will be distributed among the columns according to their columnWeight. If not specified, column widths are taken from the cell patterns.

For templated tables, this parameter is ignored.

Code Block
languagejson
"parameters": {
  "renderingOptions": {
    "excel": {
      "tableWidth": 115
    }
  }
}

Worksheets: SectionNode

A SectionNode renders its titles, and may start a new worksheet.

Simple Text: ParagraphNode

A ParagraphNode is renders its content.

Arbitrary Data: DataNode

A DataNode renders the contents of its data object. It can be used to render arbitrary content to the Excel document, as the type of the data object itself is user defined.

Since the cell patterns depend on the type of data in the object, a DataNode must have a style.

Production Errors: ErrorNode

An ErrorNode (typically the result of an error during report production) renders the error details.

...

Titles: SectionNode

A SectionNode renders its titles.

Pattern Name

Description

Optional

Example Data

section

Rows to be stamped for a section. Content data is taken from the node:

Code Block
languagetypescript
data: {
  mainTitle?: string;
  subTitle?: string;
}

Code Block
languagejson
"data": {
  "mainTitle": "Renditeattribution",
  "subTitle": "Vom 01.01.2024 bis 31.03.2024, nach Anlagekategorie"
}

Simple Text: ParagraphNode

A ParagraphNode is renders its titles and its content.

Pattern Name

Description

Optional

Example Data

paragraph

Rows to be stamped for a paragraph. Content data is taken from the node:

Code Block
languagetypescript
data: {
  mainTitle?: string;
  subTitle?: string;
  content?: string;
}

Code Block
languagejson
"data": {
  "content": "Disclaimer: the information in this document is..."
}

Arbitrary Data: DataNode

A DataNode renders the contents of its data object. It can be used to render arbitrary content 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

data

Rows to be stamped for the data object. Content data is taken from the node:

Code Block
languagetypescript
data: object | object[]

If the data is an array, the pattern is stamped for each array element.

Code Block
languagejson
"data": [
  { "id": "A", "name": "Letter A", "order": 1 },
  { "id": "B", "name": "Letter B", "order": 2 }
]

Production Errors: ErrorNode

An ErrorNode (typically the result of an error during report production) renders the error details.

Pattern Name

Description

Optional

Example Data

error

Rows to be stamped for an error. Content data is taken from the node:

Code Block
languagetypescript
data: {
  error: string;
  message?: string;
  code?: string;
}

Code Block
languagejson
"data": {
  "error": "Error: No building block with name 'BalanceBB' registered.",
  "code": "production-rep-20231213-170410-1",
  "message": "Fehler bei der Reportproduktion"
}

Debugging Excel Rendering

If the report parameter addExcelTrace to true, the rendering process is traced for each pattern, and the trace appended to the Excel document as worksheet "Pattern Usage Trace".

The trace will contain a line for each cell pattern stamped (including attempts non-existing patterns). It contains the following columns:

Column

Description

nodeType

The type of the abstract report node.

nodeId

The id of the abstract report node.

elementId

The id of the element when rendering table rows, columns, groups or facts.

range

The destination range being stamped. missing if a mandatory pattern did not exist, optional if an optional pattern did not exist, missing: generic if a missing columnHeaders pattern triggered generic table rendering.

usedPattern

The pattern used to stamp. Empty if nothing was stamped.

triedPatterns

The patterns tried before usedPattern.

data

The data being stamped.

Example trace

...