check excel cell value
Check the text content of a designated cell in an Excel spreadsheet against an expected value. Result is Passed if the values match; otherwise Failed.
Name | Description | Type | Modifier |
---|---|---|---|
file path | The location of the Excel file to be accessed. | String | None |
sheet | Name or index of the sheet within the Excel file where the action will be performed. (Index starts at 1) | String | None |
cell | Cell address (e.g., A1, B2) | String | None |
expected | The expected cell content. | String | None |
Result is Passed if the cell value and expected value match each other, otherwise Failed.
This action may be used within the following project items: test modules and user-defined actions.
Example 1: Get excel cell value by sheet name
file path
open excel workbook D:\data.xlsx
 
file path sheet cell expected
check excel cell value D:\data.xlsx Car Orders Data D14 Chevrolet Monte Carlo
 
file path auto save
close excel workbook D:\data.xlsx false
 
Result
Example 2: Get excel cell value by sheet index
file path
open excel workbook D:\data.xlsx
 
file path sheet cell expected
check excel cell value D:\data.xlsx 1 H14 Apr 14 2010
 
file path auto save
close excel workbook D:\data.xlsx false
 
Result
- This action only supports Excel extensions: .xls, .xlsx, .xlsm.
- You need to use built-in action open excel workbook before proceeding with this action.
- sheet argument:
- If a sheet name has the value as a numerical text (e.g. the sheet name is 7), enclose the value in quotation marks to differentiate it from a numerical index value (e.g. "7").
- expected argument:
- The expected argument can accept wildcard. Note that argument's values that include wildcard must be entirely enclosed in curly braces {}. As an example,
{.*arch.*}
matchesstarch
,marching
,testarchitect
, etc.
- The expected argument can accept wildcard. Note that argument's values that include wildcard must be entirely enclosed in curly braces {}. As an example,
- This action checks the displayed cell value, not the cell's formula.