How to compare two excels in uipath?

activities
studio

#1

Hi Guys,

i have two excels .in first excel i have id, name and pan id and second excel has id,name and pan id
if the employee matches in both the excels…the out put - in first excel sheet1, in column 4 it should return as a matched profile with the green color and else it should return as a non matched profile with red color.

Can anyone of you help me here ,how to do this task.

Thanks in Advance,


#2

Read both excels with Read Range, once you have them in separate DataTable apply foreach for datatable and get row item name and if name matches use write range to write in excel sheet


#3

hey…i have tried the same way.But no luck :frowning:


#4

Hello,

Initially, you need to identify unique value(For example pan id or id is unique). You have to compare pan id from excel 1 and pan id from excel 2.

Procedure:

1)Read Excel 1
2)Read Excel 2
3)For each row in a data table
4)Get row item (Pan id) (1st excel) (You will be getting each row in pan id column)(Stored in a variable)
5)Get row item (Pan id)(1st Excel) (You will be getting each row in pan id column)(Stored in a variable)

Compare 2 variables using if
Write range into Excel


#5

See attached workflow, ExcelSheet2 would have the result once you run it -

Main.xaml (17.9 KB)

ExcelSheet1.xlsx (8.5 KB)
ExcelSheet2.xlsx (8.5 KB)