Using the Import Excel or CSV Step
  • 14 Dec 2021
  • 2 Minutes to read
  • Dark
    Light

Using the Import Excel or CSV Step

  • Dark
    Light

Article Summary

Overview

The Import Excel or CSV Flow step retrieves data from an Excel or CSV spreadsheet used to define data members and values of a data type in Decisions. For this to happen, a data type must be created in Decisions using data members that correspond with the column headers in the spreadsheet. For example, a spreadsheet with "First Name" and "Last Name" columns would import to an existing data type in Decisions that have "First Name" and "Last Name" as data members. This is how external data can be integrated into the workflow process.

Extract, TransForm, and Load (ETL)
This Flow step can be used for creating ETL processes.

Example

This example will create a Flow Structure named "CorpLocations", then import an Excel file and map the rows/columns to the Corporate Locations Flow Structure's proper data members.

The spreadsheet used in this example:


  1. In a Designer Folder, select CREATE DATATYPES/INTEGRATIONS in the Global Action Bar. Choose the Flow Structure option, then select CREATE. 
  2. Name the structure "CorpLocations" and give it the following data members: City (String), State (String), NumOfEmployees (String). 
  3. Back in the Designer Folder,  select CREATE FLOW from the Global Action Bar. Name the Flow and select CREATE to open it in the Flow Designer.
  4. In the Flow Designer, off of the Start steps 'Done' path, add an Import Excel or CSV from the Data > Excel and CSV category.

  5. Configure the Input Data in the Properties panel.
  6. Choose Excel_xlsx in the Input File type drop-down. 
  7. The first row of the file is a header; start the data collection on the second row by typing "2" in the Start On Row field. 
  8. Import the first 3 columns of data from the file, so type "3" in the Number of Columns field. 
  9. Leave Worksheet Index blank as the file being used only has one worksheet.

  10. In the Output Data section, type and then select "CorpLocations in the Output DataType drop-down. 
  11. A new sub-section called Mapping appears within the Output Data section. Due to "3" being typed in the Number of Columns input, three invalid columns appear.

  12. Select the 'Edit' icon for the first column. In the resulting Edit Mapping dialog, under Property, select City in the Name drop-down menu. Select 'OK' to close the Edit Mapping dialog.

  13. Configure the two remaining columns, State and NumOfEmployees.
  14. In the Inputs > File Data section, select Constant as the mapping type. Browse to the desired file and select 'Open' to load the file as input.
  15. Connect the outcome paths of the Flow. In a production scenario, connect the exception paths to exception handling steps. For example purposes, connect all outcome paths to the End Step to complete the Flow.

Debug

  1. Select Debug in the top action panel of the Flow Designer. 
  2. Run the Flow, then select 'View Input/Output Data'. In the resulting dialog, notice that the Excel file's data was mapped to the proper Flow Structure properties.



Was this article helpful?