Import Fixed Position
- 21 Feb 2025
- 2 Minutes to read
- Print
- DarkLight
Import Fixed Position
- Updated on 21 Feb 2025
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Step Details | |
Introduced in Version | 4.0.0 |
Last Modified in Version | 7.12.0 |
Location | Data > Excel and CSV |
The Import Fixed Position step is used to import rows from an excel file starting from a specific row and character position. Each row is treated as a single string.
Properties
Error Handling
Property | Description | Data Type |
---|---|---|
Extra Columns in Input | Will provide an error if extra columns are found in the input (Add Outcome: provides an outcome path, Throw Exception will throw an exception on reaching error, Ignore and Continue: will add an outcome path and ignore the error.) | --- |
Less Columns in Input | Will provide an error if the columns found are less than expected (Add Outcome: provides an outcome path, Throw Exception will throw an exception on reaching error, Ignore and Continue: add an outcome path and ignore the error.) | --- |
Value Conversion Error | Will send an error if a value can not be converted (Add Outcome: provides an outcome path, Throw Exception will throw an exception on reaching error, Ignore and Continue: add an outcome path and ignore the error.) | --- |
Import Raw Lines
Property | Description | Data Type | |
---|---|---|---|
Import Raw Lines | Add data of row into the specified field | --- | |
Into Property | Specify the mapped data field | --- |
Input Data
Property | Description | Data Type |
---|---|---|
Input File Type | Defines what the data type of the input file is | --- |
CSV Delimiter | Defines the delimiter specified in the CSV file | --- |
Ignore Quotes (Do not treat as escaped) | Ignores column names that contain quotes | Boolean |
Input File Encoding | Defines the encoding type | --- |
Number of Columns | Specifies the number of columns that will be imported | Int32 |
Output Data
Property | Description | Data Type |
---|---|---|
Output Data Type | Defines the output data type | --- |
Inputs
Property | Description | Data Type |
---|---|---|
File Data | The CSV or Excel file | FileData |
Mapping | The defined settings used to map the row to the fields to the output data type | --- |
Outputs
Property | Description | Data Type | |
---|---|---|---|
Done | |||
Imported Data | Returns the data that was successfully imported | List of [Data Type] | |
Extra Columns Error | |||
Actual Columns Number | Returns the number of columns | Int32 | |
Input Line | Returns the input line or error | Int32 | |
Line Number | Returns the line number of error | Int32 | |
Less Columns Error | |||
Actual Columns Number | Returns the number of columns | Int32 | |
Input Line | Returns the input line or error | Int32 | |
Line Number | Returns the line number of error | Int32 | |
Value Conversion Error | |||
Column Number | Returns the column number of error | Int32 | |
Error Message | Returns the error message | String | |
Input Line | Returns the input line or error | Int32 | |
Line Number | Returns the line number of error | Int32 | |
Source Value | Returns what the source value is | String | |
Target Type | Returns the expected data type | String |
Example Inputs and Outputs
Input | Output |
---|---|
CSV File | Mapped Data to a DataType |
.txt File | EXCEPTION MESSAGE |
Common Errors
Start position outside of the length of the string
If the start position for a mapped field is outside the specific length of the string, then the following error will be thrown. To ensure this does not occur, set the Start position to be a value that is available for all rows.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Import Fixed Position (Runtime Mappings) 1[ImportFixedDynamicStep] in flow [Testing Flow]: Index and length must refer to a location within the string. (Parameter 'length') ---> System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. (Parameter 'length')
at System.String.Substring(Int32 startIndex, Int32 length)
at DecisionsFramework.Design.Flow.CoreSteps.CSV.ImportFixedDynamicStep.Run(StepStartData data)
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData)
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
Related Information
Training Video:
Dynamic Excel Creation
Was this article helpful?