pfx-excel:unmarshal

Transforms the given Excel file into internal structure.

Properties

Option

Type

Default

Description

Option

Type

Default

Description

hasHeaderRecord

Boolean

true

Indicates whether 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 (default)

The default configuration expects that the data resides in the first sheet (index 0) and contains a header row. The format of the input is automatically determined based on the structure. XLS/XLSX formats are supported. 

Input:

Route:

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

 

Output:

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

 

Transform Excel file into internal representation (without header)

Input:

Route:

<to uri="pfx-excel:unmarshal?header=sku,name&hasHeaderRecord=false"/>

 

Output:

IntegrationManager version 5.8.0