pfx-excel:marshal

Transforms internal representation into the Excel format.

Properties

Option

Type

Default

Description

Option

Type

Default

Description

skipHeaderRecord

Boolean

false

Determines whether to skip the header record in the output. 

hasHeaderRecord

Boolean

true

Indicates whether the input contains a header record (must be on the first row).

header

string

 

List of headers from the input which should be present in the output.

format

string

xlsx

Sets the format of the output data. Defaults to 'xlsx'. Options: 'xlsx', 'xls'.

sheetIndex

integer

0

Index of the sheet with the required data.

sheetName

string

 

Name of the sheet with the required data. If filled, it has precedence over sheetIndex.

Examples

Marshal data into Excel format (default)

Route:

<route> <from uri="direct:start"/> <log message="${body}"/> <setBody><groovy>[[sku: 'sku', name: 'name'], [sku: 10, name: 'BMW'], [sku: 20, name: 'AUDI']]</groovy></setBody> <to uri="pfx-excel:marshal"/> </route>

 

Output:

 

Marshal data into Excel format (without header record)

Route:

<route> <from uri="direct:start"/> <log message="${body}"/> <setBody><groovy>[[sku: 10, name: 'BMW'], [sku: 20, name: 'AUDI']]</groovy></setBody> <to uri="pfx-excel:marshal?header=sku,name&hasHeaderRecord=false"/> </route>

 

Output:

 

IntegrationManager version 5.8.0