pfx-excel:marshal
Transforms internal representation into the Excel format.
Properties
Option | Type | Default | Description |
---|---|---|---|
| Boolean | false | Determines whether to skip the header record in the output. |
| Boolean | true | Indicates whether the input contains a header record (must be on the first row). |
| string | Â | List of headers from the input which should be present in the output. |
| string | xlsx | Sets the format of the output data. Defaults to 'xlsx'. Options: 'xlsx', 'xls'. |
| integer | 0 | Index of the sheet with the required data. |
| string | Â | Name of the sheet with the required data. If filled, it has precedence over |
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