How to compare two excels in uipath?



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,


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


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



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.


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

. For ex. in excel A , i have ZXRC=1, in excel B wherever i find ZXRC, i have to update 1 in next column.... its like UPDATE query in to proceed

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)



I have to compare Data from two separate sheets of same Excel columns and write the status as pass or fail in first sheet.but,iam unable to do it,since iam new to ui path.please,provide me solution.