Use the Find
action to find a particular string in a Microsoft Excel spreadsheet or a CSV
file.
Procedure
Consider a scenario where you have a Microsoft Excel
document titled YTDSales.xls that contains annual sales data. You
want to find all the values from the July spreadsheet that are
equal to 1500.
-
Double-click or drag the Find
action from the Excel node in the
Actions palette.
-
Click the From drop-down menu and select
Beginning.
- Beginning: Starts the search from the beginning of the
spreadsheet.
- End: Starts the search from the end of the
spreadsheet.
- Active cell: Starts the search from the active cell in
the spreadsheet.
- Specific cell: Enables you to specify the address of
the cell from where you want to start the search.
-
Click the Till drop-down menu and select
End.
Use the Find and Till menu to
specify the start and end point of the cell range for search.
-
In the Find field, enter 1500.
-
From the Search options, select By
rows.
The By rows option enables you to search the spreadsheet by
rows, while the By columns enables you to search by
columns.
-
Select the Match case check box.
- Match case: Only performs this action on
cells that contain a string that matches the uppercase and lowercase characters
of the string you specified in the Find field.
- Match entire cell contents: Enables you to find only
those cells that contain the entire string you have specified in the
Find field.
-
Enter
the name of the session used to open the workbook
with the Open
action.
- Optional:
Click the Assign cell addresses to variable drop-down menu
and select the list variable of string data type that you want to use to store the
output from the list.
-
Click Save.
A list of cell addresses that contain the value
1500 is displayed.Note: An empty list is
displayed if the specified value is not found.