How to Get exact match in LookupRange Activity

Hello All,

How to get the Exact Mach using lookup range activity. For example i want to search for Policy ID column name. when i am using lookup range its giving results when " Policy " exists, but i want to check if Policy ID is available or not .Can you help me with this

  1. Read the Excel or CSV file: Use the “Read Range” activity to read the data from your Excel file or CSV into a DataTable variable.
  2. Check if the column exists: Use the following steps to verify if the “Policy ID” column exists exactly as "Policy ID."a. Use an “If” activity to check if the column exists. You can use the “Columns.Contains” method on the DataTable to do this.b. In the condition field of the “If” activity, enter the following expression:
    YourDataTable.Columns.Contains(“Policy ID”)
    c. If the condition evaluates to true, it means the “Policy ID” column exists.
  3. Process based on the result: In the “Then” part of the “If” activity, you can perform further actions based on whether the “Policy ID” column exists or not.

Regards

hello @B_H_Akshatha_Pai thanks for answering the question. actually Excel Data is not starting from Row 1 it starts from row no 10 or 13 or it can be anywhere but not on starting row. So to find out the starting row i am searching for Column Name to identify the Starting row.

@Aswini

You can use find/Replace activity. You have options to match whole content which can be checked

cheers

@Anil_G Thanks for answering the question, but i want to check in Excel. Find/Replace can used within the string manipulations right?

@Aswini

Find/replace activity is there in excel as well

https://docs.uipath.com/activities/other/latest/productivity/find-replace-value-x

I hope you are on modern design

Cheers

@Anil_G i m currently in classic design

@Aswini

Either follow 1 of the below two

  1. Activities → filter icon → modern …this shows the modern activites
  2. You can read the datatable and use lookup datatable and find the index and use in the excel

Cheers