pfx-excel:streamingUnmarshal

Transforms the given Excel file into internal structure in a fully streaming way. The limitation is that it only works with XLSX files (XLS cannot be streamed). The advantage is that compared to the unmarshal method, this one has substantially less memory footprint.

Properties

Option

Type

Default

Description

Option

Type

Default

Description

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.

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.

skipHeaderRecord

Boolean

false

Determines whether to skip the header record in the output. 

Examples

Transform Excel file into internal representation streaming (default)

The default configuration expects that the data resides in the first sheet (index 0) and contains a header row. It must be a XLSX file.

Input:

Route:

<to uri="pfx-excel:streamingUnmarshal"/>

 

Output:

[[sku: 'sku', name: 'name'], [sku: '10', name: 'BMW'], ["sku": '20', "name": "AUDI"]]

 

IntegrationManager version 5.8.0