Search String in Excel for Corresponding Values

Hi all, I have extracted a string from a pdf I am working with and I would like to search up its ID and Code in an Excel Spreadsheet. For example, I have extracted “Apple” from my pdf and I have to look up its ID and Code in the image below. How do I do so?

image

dr = dt.AsEnumerable.SingleOrDefault(Function (x)x(0).ToString = value)
dr is DataRow

Hi @Eric_Wong_Test ,

I got an error saying: Value of type “System.Data.DataRow” cannot be converted to “String”.

I inputted your code in an Assign activity.
My dt variable is “DataTable” Type.

if you want to get the value in datarow
string = dr(0).ToString


Screenshot 2021-04-16 115712

Easiest way is to use the lookup datatable activity

Check this workflow

workflow : Main.xaml (8.9 KB)

sample excel file used: test.xlsx (7.5 KB)

Regards,

Nived N
Happy Automation

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.