get excel cell containing

Retrieve the cell address, within its Excel spreadsheet, containing the specified text value.
NameDescriptionTypeModifier
file path

The location of the Excel file.

StringNone
sheet

Name or index of the sheet within the Excel file where the action will be performed. (Index starts at 1)

StringNone
text

Text to be searched for.

StringNone
range

(Optional) The reference of range(s) that you want to search in (e.g., A1:B2, A5:A10).

StringNone
after cell

(Optional) The cell after which you want the search to begin (e.g., A1, B2).

StringNone
search order

(Optional) The order in which to search the range.

Default Value: by rows
Value Setby rows, by columns
variable

(Optional) The variable to receive the returned cell address.

Default Value: _variable
StringNone
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.
The following settings are applicable to this action: case sensitive, ignore blank space.
Example 1: Unique cell matching

        
          	file path						
open excel workbook	D:\data.xlsx						
&nbsp							
	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
&nbsp							
	file path	auto save					
close excel workbook	D:\data.xlsx	false					
&nbsp							
        
    
Result
Example 2: Multiple cells matching

        
          	file path						
open excel workbook	D:\data.xlsx						
&nbsp							
	file path	sheet	text	range	after cell	search order	variable
get excel cell containing	D:\data.xlsx	1	Clinton		D10	by rows	last_name
&nbsp							
	file path	auto save					
close excel workbook	D:\data.xlsx	false					
&nbsp							
        
    
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.*} matches starch, marching, testarchitect, etc.
  • 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.
  • variable argument:
    • If the variable in argument cell has not been declared or left empty, TestArchitect supplies a global variable with the name _variable.

Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400