Import Excel or CSV ( Runtime Mappings ) Step
Comments
-
This step seems like it will do what I need (import spreadsheets and map the data to Decisions), but I have no idea how to use it.
Help? -
Attached is an export exemplifying this step in use, and the accompanying .xlsx file for convenience.
The [b]Import Excel or CSV (Runtime Mappings) [/b]step takes an Excel or CSV spreadsheet and then maps a specified range of columns and their data to a list of Decisions objects.
Each object in the returned list represents a row of spreadsheet data - a composite data type composed of data members structured as “Column Header Name: Cell Value”. See below image for example.
[img]att1[/img]One of the keys to making this work is the step’s [b]Mapping [/b]property.
It must take in a list (can have single item or many) of type [b]DynamicCSVMapping [/b]as input.
This type contains properties that you must define to instruct the step on how to interpret the spreadsheet data.
The minimum [b]DynamicCSVMapping[/b] properties that must be defined for the step to function are:
ColumnNumber, FieldName, and FieldType.- FieldName [b]must match[/b] the column header in the spreadsheet, and the ColumnNumber [b]must correctly point to this column[/b] - otherwise an error will be thrown.
- The leftmost spreadsheet column is referred to by ColumnNumber value 0, not 1.
Finally, the [b]Output Data Type[/b] property of the step must be of a data structure that contains data members whose [b]names and types must match[/b] the imported spreadsheets column names and column data types.
A Simple Flow Structure works well for this if you don’t need to store the data after flow-end.
[i]edited by Brendan@decisions.com on 6/4/2019[/i]