How to match the values from excel?

Dear All,

My requirement is as below:

I need to fetch the code from an web application.

After fetching the code: ABCD(For example),

I need to match this fetched code with an excel as below:

Code EnglishName
ABCDE SoftwareEngineer
WXYZ Senior Software engineer
GEF TL
MNOP Manager

If the fetched code is ABCDE then I need to get tge EnglishName data:

i.e: 1. If the fetched code is ABCDE then I need to get Software engineer
2. If the fetched code is WXYZ then I need to get Senior Software engineer
3. If the fetched code is GEF then I need to get TL
4. If the fetched code is MNOP then I need to get Manager

Please let me know how to do this.

Note: The code is dynamic

Hello @naveen.s

You can read the Excel file to a Datatable and then use “Lookup Data Table” activity to look for, and return the required value.

Regards
Soren

Hi @naveen.s

Try this way,

Store your input into one variable & Excel file also

image

Then use the Lookup data table activity

image

In the property mention the your Input as Dt and String

Lookup column mention column name “code”

Output create the output variable in the Cell value field

Target column mention the column name “EnglishName”

image

Output

image

Regards,
Gowtham K

Hi @naveen.s

Can you try the below query?

EnglishName = dt.AsEnumerable().Where(Function(row) row("Code").ToString.Trim = fetchedCode.Trim).Select(Function(row) row("EnglishName").ToString).FirstOrDefault()

Regards,