Vlookup between two different excel file sheets

Hello everyone,
I am facing some issues while applying vlookup between two excel file sheets using the lookup datatable activity in uipath.
Can anyone please provide help for how to properly apply Vlookup or lookup datatable between two different sheets of different files for eg. say sheet “abc” of xlsx file 1 and sheet “def” of xlsx file 2.

Thankyou

2 Likes

@Shikhar_Tandon,

Check this thread,

1 Like

hi @sarathi125 i looked on the thread but it contains vlookupbetween two different sheets of a excel file i want between sheets of two different excel files .

1 Like

Fine
hope these steps would help you resolv ethis
–use excel application scope and pass thee file path of first excel file
–then use inside that scope use READ RANGE activity and get the output with a variable of type dattable named dt1
–again use another excel application scope and pass the file path of second excel file
–inside that use read range and get dt2 variable
–now use a FOR EACH ROW activity where pass dt1 as input and inside the loop use LOOKUP DATATABLE ACTIVITY where (if we are trying to compare the second column in two datatable and get the output value of matching from 4th column in dt2 and update them in 4th column of dt1)
mention these in property panel LOOKUP DATATABLE
input - row(1).ToStringg
datatablee - dt2
lookup column index - 3 (from dt2)
Target column index - 3 (from dt2)
out result - str_output
–so followed by this LOOKUP DATATABLE ACTIVITY use a assign activity likethis
row(3) = str_output.ToString

thats all you are done
Here you go with a sample xaml
lookup.zip (21.3 KB)

hope this would help you
Cheers @Shikhar_Tandon

1 Like

@Shikhar_Tandon,

Can you check with this one?
GetDataMultipleExcel.xaml (7.1
KB)

1 Like

Well @sarathi125 thanks for the response and sorry for the delay to revert, your workflow is good but in the lookup activity you are using a datatable dtMtest and the lookup column and target column belong to same datatable, in my problem the values are coming from different datatables. Let me explain see for example there are two files say PAC_abc.xlsx and the other is Grcy.xlsx file, both are attached. For the solution i have to - " In Col ‘AF(column32) of file PAC_abc.xlsb’
Apply VlookUP from “Grcy.xlsx” file Tab “Grcry” col
‘A’(column1) using the key col ‘BGrcy.xlsx (9.2 KB) PAC_abc.xlsx (9.2 KB) (Column2)’ in PAC_abc.xlsx ".
this is the type of which i am trying to find solution tab is sheet here.

If any issues or confusion please revert asap i will clear it.

@Palaniyappan also please look on to this.

Please revert with a solution

Thanks ,
Shikhar