Skip to content

Get EXCEL Cell Value Using Cell Reference: getCellReference

The Get EXCEL Cell Value Using Cell Reference function retrieves the value from a specific cell in an Excel file. This function is useful for extracting data from a known cell location for further processing in automation.

Example: Suppose you have an Excel file named EmployeeData.xlsx stored at C:\User\Documents\EmployeeData.xlsx. You need to fetch the employee name from cell B2 in the first sheet and store it in a variable.

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

Steps to Configure:

  1. Add a New Step.
  2. Select Set a Variable Value from the Action dropdown.
  3. Leave the Screen Name field blank.
  4. Enter a variable name in the Element Key field (e.g., CellValue). This variable will store the retrieved data.
  5. Click on Form, select Functions, and choose Get EXCEL Cell Value Using Cell Reference from the dropdown.
  6. Provide the required parameters:
    • File Path: The location of the Excel file.
    • Cell Reference: The specific cell to fetch data from (e.g., B2).
    • Sheet: The sheet index in the Excel file (e.g., 1 for the first sheet).
    • SheetName: The sheet name of the Excel file (e.g., EmplyeeData).
  7. Click Save.

Note: While the steps for adding an Action are identical in both views, the display of the steps changes:

scrn-get-cell-reference-tabular-view
Tabular View
scrn-get-cell-reference-card-view
Card View

Outcome on Execution:

  • Retrieves the value from the specified cell in the given Excel file.
  • Stores the extracted data in the variable defined in the Element Key field.
  • The stored value can be used in subsequent automation steps using the syntax ${variable name} (e.g., ${Cell Value}).

Back To Top