readValuesFromCSVandExcel Step

Use this step to read values from CSV, EXCEL and TXT file types.

Last published at: September 5th, 2023

Description:

This step reads values from CSV, EXCEL and TXT file types. 

Inputs

  • inputFilePath - variable / global that holds the XLS / XLSX / CSV / TXT file path on the server
  • mapCellDataToVariables - Map cell data to variables / globals
  • worksheetName - Worksheet name (not mandatory) when blank, selects the first worksheet name in the workbook / CSV and even the incorrect worksheet name refers the first worksheet in the workbook / CSV. 
 

 

Returns

  • True – True condition
  • False – False condition
 

 

Configure:

The FW Admin should configure the new data type and the process step (for the first time) following this hirearchy. 

Navigate to Administration - Data Types - Utils - Auto Detect to open in a new tab. Search for clsCsvAndExcelDataMap. Select Manage - Configure menu option. The data type shall be configured for the relative process step for use. 

Navigate to Administration - Steps - Utils - Auto Detect to open in a new tab. Search for readValuesFromCSVandExcel step. Select Manage - Configure menu option. The step type shall be configured for use in the process definition. 

 

Usage:

 

 

Example:

Let’s build and execute the “readValuesFromCSVandExcelDef” example.          

  • Create a new definition called “readValuesFromCSVandExcelDef” 
  • Select the definition and click the “design” button
  • Drag a “readValuesFromCSVandExcel” step from the toolbox
  • Connect the dots between the steps as shown on the above graphic 
  • Let's assume the XLSX file is available on the server path with the sample data on Sheet2 worksheet as shown below 
  • Click on the “readValuesFromCSVandExcel” step to configure its “Settings” properties. Provide a name to the step. Provide the file or folder path information on the FlowWright server.
  • Click on the “readValuesFromCSVandExcel” step to configure its “Advanced” properties. Provide the worksheet name reference. 
  • Map the excel/csv data to the variables/globals as shown below using the Row and Column notation.
  • Save the process definition, create a process instance and execute. Render the process instance which is completed to view the step properties. This step should read the CSV and Excel values from the Sheet2 worksheet and initialize the process variables.