Generate Excel

This handler (com.rierino.handler.ExcelExportEventHandler) provides ability to produce well formatted Excel files using templates and input payload.

Handler Parameters

Parameter
Definition
Example
Default

template.state

Name of the state manager with template definitions

template_xlsx

handler_excel

output.system

Alias of the system to store Excel file produced on

s3_default

-

This handler requires the following dependency added to deployment contents:

implementation (group:'com.rierino.custom', name: 'excel', version:"${rierinoVersion}")

Actions

ExportXLSX

Produces Excel file from given input data and template id. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

inputElement

Json path for the input in request event payload

customer

-

With event metadata parameters as:

Parameter
Definition
Example
Default

templateId

Id of the template to use from code.state

landing_page

-

inputPattern

JMESPath pattern to apply on input element

{sheets: list}

-

sheetsPath

Json path in payload including data for sheets (in {[sheet_name]: [ {[field]: [value]} ]} format)

list

sheets

outputPath

Json path in payload defining the output file path on target file system

file_path

path

Content Format

Templates used by this handler have the following data format:

{
    "name": "NAME",
    "header": {},
    "columns":[
        {"title": "TITLE", "field": "FIELD", "titleStyle": {}, "rowStyle": {}}
    ],
    "footer": {}
}

titleStyle and rowStyle are provided using Apache POI cell style keys.

Last updated