Import Excel or CSV
  • 29 Jul 2024
  • 2 Minutes to read
  • Dark
    Light

Import Excel or CSV

  • Dark
    Light

Article summary

Step Details

Introduced in Version---
Last Modified in Version8.21.0
LocationData > Excel & CSV

The Import Excel or CSV step Imports/loads data from CSV or Excel files. In turn, this imported data is then converted into the user-determined Output Data Type. The step operates off the assumption that the imported data has properties corresponding to the File Columns. The Input File Type is selected via the Property of the same name. Users then define which Row in the spreadsheet the step reads from via the Start On Row Input. Information from the File's Columns is determined via the Number of Columns Input and by Mapping Properties for each. Due to its effectiveness and speed, this step functions well for importing large amounts of CSV data. 

Password Protection
Sheets with password protection will fail in every version before v8.21 or v9.2.


Properties

Inputs

PropertyDescriptionData Type
File DataFile to ImportFile Data

Input Data

PropertyDescriptionData Type
Input File TypeDefines the type of file used as an input to the step. Currently, the options are Csv, Excel_xls, Excel_xlsx and AutoSelect.---
Start on RowDefine which Row is the first row to begin importing data from.Int32
CSV DelimiterDetermines which delimiter is used in the CSV files.---
Ignore Quotes (Do not treat as escaped)Ignores quotes within the data that is imported.Boolean
Input File EncodingSet which encoding type the File has, ASCII or UTF8---
Number of ColumnsThe number of columns within the Excel or CSV file.Int32
Worksheet Index  (only inv8.21+ and v9.2+) This is the index of a particular sheet in an Excel file that is password protected. For protected CSVs this would be 0.Int32
Document Password (only inv8.21+ and v9.2+)For password protected files, the password will need to be supplied in this field.String

Import Raw Lines

PropertyDescriptionData Type
Import Raw LinesImport the data within the file as raw lines.Boolean
Into PropertyPick one of the properties on the datatype being mapped to and have that property take in all the values of the excel sheet as a comma-separated list.---

Output Data

PropertyDescriptionData Type
Output Data TypeDefine the data type to import the Excel or CSV data to.---

MappingDefine which columns equate to which data fields. ---

Error Handling

PropertyDescriptionData Type
Extra Columns in InputWill 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 InputWill 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 in InputWill 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.)---

Outputs

PropertyDescriptionData Type
Imported DataReturns the data that was successfully importedList of [Data Type]
Extra Columns Error

Actual Columns NumberReturns the number of columnsInt32

Input LineReturns the input line or errorInt32

Line NumberReturns the line number of the errorInt32
Less Columns Error

Actual Columns NumberReturns the number of columnsInt32

Input LineReturns the input line or errorInt32

Line NumberReturns the line number of the errorInt32
Value Conversion Error

Column NumberReturns the column number of the errorInt32

Error MessageReturns the error messageString

Input LineReturns the input line or errorInt32

Line NumberReturns the line number of the errorInt32

Source ValueReturns what the source value isString

Target TypeReturns the expected data typeString



Feature Changes

DescriptionVersionDateDeveloper Task
Added in password-protected sheet functionality and properties.8.217/17/2024[DT-041338]


Related Information

Example Labs:
Import Excel File and Use It for a Drop Down

Forum Posts:
Changing Date Format On Import CSV Or Excel


Was this article helpful?