Skip to content

Load CSV File And Store Data Function: LoadCSVFile

The Load CSV File And Store Data function loads a CSV file and stores its data in a variable (alias name) for further processing. This function is useful for handling structured data from CSV files within automation workflows.

Note: Ensure that the file being used is not open during the Case execution to avoid errors or conflicts.

Example: Suppose you have a CSV file named EmployeeData.csv located in the folder C:\Data\ and you want to load its content for use in further automation steps.

Steps to Configure:

  1. Add a new step.
  2. From the Action dropdown, select Run Utility Commands.
  3. Leave the Screen and Element Key fields blank.
  4. In the Parameter section, click Form and select Functions from the dropdown.
  5. Choose Load CSV File And Store Data from the list of functions.
  6. Provide the Required Details:
    • File Path: Provide the full path to the CSV file (e.g., C:\Data\EmployeeData.csv).
    • Alias: Enter the variable name to store the data (e.g., EmployeeData).
  1. Click Save.

Note: The Alias Name is the variable where the loaded CSV file data is stored. Once the data is loaded, you can retrieve values using the Get Excel Cell Value Using Column Name function or update values using the Set Excel Cell Value Using Parameters function.

Tabular View
Card View

Outcome on Execution:

  • The data from the specified CSV file is loaded into the variable (alias name) provided in the parameters.
  • The extracted data can be accessed dynamically in subsequent automation steps using the syntax ${alias variable}
  • You can now retrieve specific value using the Get EXCEL Cell Value Using Column Name function.
  • You can also update a specific cell value using Set EXCEL Cell Value Using Parameters function.

Using the Alias Name to Extract and Update Data

Once the data is loaded, you can:

Extracting Data Using Get EXCEL Cell Value Using Column Name

After the CSV file is loaded, you can access its data using the Get Excel Cell Value Using Column Name function by specifying the alias name, column name, and row index.

Example: You want to retrieve the name of the second employee (row index 1) from the previously loaded EmployeeData.csv file and store it in a variable called EmployeeName.

Steps to Configure:

  1. After configuring the Load CSV File And Store Data Function, add a new step.
  2. Select Set a Variable Value from the Action dropdown.
  3. In the Element Key field, enter the name of the variable that will store the result of the operation (e.g., EmployeeName).
  4. Click Form to open the Configuration Form:
  5. From the dropdown, select Functions and choose Get EXCEL Cell Value Using Column Name.
  6. Provide the Parameters in the following syntax:

EmployeeData.FirstName.0

Where:

    • Alias Name: EmployeeData
    • Key (Column Name): FirstName
    • Row Index: 1 (to select the second row)
  1. Click Save.
Extracting Data using Get EXCEL Cell Value Using Column Name: Tabular View
Extracting Data using Get EXCEL Cell Value Using Column Name: Card View

The following screenshot shows how the Load EXCEL File And Store Data and Get EXCEL Cell Value Using Column Name functions are used in an automation workflow:


Expected Outcome on execution:

  • The value of the cell in the second row and FirstName column is retrieved and stored in the EmployeeName variable.
  • You can use this value in subsequent workflow steps using the syntax ${EmployeeName}

Updating Data Using Set EXCEL Cell Value Using Parameters function

After the CSV file is loaded, you can update a specific cell using the Set EXCEL Cell Value Using Parameters function by specifying the alias name, key, column index, and new value.

Example: Suppose you have a CSV file named EmployeeData.csv located in the folder C:\Data\. You have already loaded this file using the Load CSV File and Store Data function and assigned it the alias name EmployeeData. Now, you need to update the salary of an employee whose Employee ID is E102.

Steps to Configure:

  1. After configuring the Load CSV File And Store Data Function, add a new step.
  2. Select Run Utility Commands from the Action dropdown.
  3. Click Form, select Functions, and choose Set EXCEL Cell Value Using Parameters.
  4. Provide the following parameters:
    • Alias Name: EmployeeData (the alias assigned when loading the CSV file).
    • Key = Value.Index: Salary=80000.2
    •  Where:
      • Salary: Column to update
      • 80000: New value
      • 2: Row index (corresponding to Employee ID 102)
    • Sheet: Provide the Sheet Number (e.g., 2)
    • Orientation: Specify how the data is structured:
      • H for Horizontal (row-wise data loading)
      • V for Vertical (column-wise data loading)
  5. Click Save.
Updating Data using Set EXCEL Cell Value Using Parameters: Tabular View
Updating Data using Set EXCEL Cell Value Using Parameters: Card View

The following screenshot shows how the Load EXCEL File And Store Data and Set EXCEL Cell Value Using Parameters functions are used in an automation workflow:


Expected Outcome on Execution:

  • Upon execution, the function updates the specified cell for Employee ID E102 in the loaded CSV data stored under EmployeeData.

Back To Top