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, select the first worksheet name in the workbook / CSV; even the incorrect worksheet name refers to the first worksheet in the workbook / CSV.
Returns
- True – True condition
- False – False condition
Configure:
Following this hierarchy, the FW Admin should configure the new data type and the process step (for the first time).
Navigate to Administration - Data Types - Utils - Auto Detect to open in a new tab. Search for clsCsvAndExcelDataMap. Select the Manage - Configure menu option. The data type shall be configured for the relative process step.
Navigate to Administration—Steps—Utils—Auto Detect to open in a new tab. Search for the readValuesFromCSVandExcel step. Select the 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 in the above graphic
- Let's assume the XLSX file is available on the server path with the sample data on the Sheet2 worksheet, as shown below
- Click on the “readValuesFromCSVandExcel” step to configure its “Settings” properties. Give the step a name. 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 Row and Column notation.
- Save the process definition, create a process instance, and execute. When the process instance is completed, render it to view the step properties. This step should read the CSV and Excel values from the Sheet2 worksheet and initialize the process variables.