get excel cell containing
Retrieve the cell address, within its Excel spreadsheet, containing the specified text value.
Name | Description | Type | Modifier |
---|---|---|---|
file path | The location of the Excel file. | 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 |
text | Text to be searched for. | String | None |
range | (Optional) The reference of range(s) that you want to search in (e.g., A1:B2, A5:A10). | String | None |
after cell | (Optional) The cell after which you want the search to begin (e.g., A1, B2). | String | None |
search order | (Optional) The order in which to search the range. Default Value: by rows | Value Set | by rows, by columns |
variable | (Optional) The variable to receive the returned cell address. Default Value: _variable | String | None |
The address of the first cell containing the desired text.
This action may be used within the following project items: test modules and user-defined actions.
Example 1: Unique cell matching
file path
open excel workbook D:\data.xlsx
 
file path sheet text range after cell search order variable
get excel cell containing D:\data.xlsx Car Orders Data RCV05 by rows unique_id
 
file path auto save
close excel workbook D:\data.xlsx false
 
Result
Example 2: Multiple cells matching
file path
open excel workbook D:\data.xlsx
 
file path sheet text range after cell search order variable
get excel cell containing D:\data.xlsx 1 Clinton D10 by rows last_name
 
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.
- If no matching cell is found, a variable with the empty value is returned.
- 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").
- text argument:
- The text 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 text argument can accept wildcard. Note that argument's values that include wildcard must be entirely enclosed in curly braces {}. As an example,
- range argument:
- If the range is empty, the default range is the used range. The used range includes all cells from the top-left cell with data to the bottom-right cell with data or formatting.
- after cell argument:
- The after cell must be a single cell in the range. Remember that the search begins after this cell.
- If you don't specify this argument, the search starts after the cell in the upper-left corner of the range.
- search order argument:
- Specifies the order in which to search the range, can be one of following values:
- by rows: Searches across a row, then moves to the next row.
- by columns: Searches down through a column, then moves to the next column.
- Specifies the order in which to search the range, can be one of following values:
- variable argument:
- If the variable in argument cell has not been declared or left empty, TestArchitect supplies a global variable with the name
_variable
.
- If the variable in argument cell has not been declared or left empty, TestArchitect supplies a global variable with the name