Comparing each row value from 2 excel workbooks


There are 2 excel workbooks. The 1st workbook values are standard and 2nd workbook has dynamic values. We need to compare the 1st workbook 1st row data with 2nd workbook 1st row only and 2nd row in 1st workbook with 2nd row in 2nd workbook and so on. If the 1st row value in the 1st workbook not matches with 1st row in the 2nd workbook then we need to highlight that cell with a colour and 2nd row value in the 1st workbook not matches with the 2nd row in the 2nd workbook then we need to highlight that cell with a colour and so on.

Can any one suggest soloution for this.


try the below steps

  1. Use Read range activity to read the first file data
  2. Use excel Scope
  3. Use Excel file and give second file as input
  4. for each excel row activity to iterate through rows of second file
  5. use for each activity and dt.columns here dt is first excel datatable
  6. use if condition to compare the data
  1. then block use format cells activity and give

and give formating details like color

  1. else block if you want you can keep any thing other wise leave blank

refer below file which is similar but make necessary changes (18.2 KB)


Can you please explain in details please

do you have any confusion on the points or the file attached

Are you able to open the file?

if you can provide the sample files i can build


Present Week.xlsx (9.8 KB)
Previous Week.xlsx (9.7 KB)

the last column name is not same in both the files it is by mistake or

it is actually stay same for both


sorry. its by mistake.

it should be same for both files.

ok then i have made the flow

Compareandformat.xaml (16.5 KB)

but i have altered excel files first to second don’t get confused

you change the file names as per you requirement

if you still face any issue let me know


How to open this file in UiPath??


just double click it will open


Thanks a lot.


By any chance can we able to store only mismatched cells along with the headers??


can you elaborate

where do you want to store them?

and in which format?


I want the mismatched cells with headers and Sl.No but not entire rows to store in the output file.

here I have highlighted the mismatched cells with the yellow colour for identification purpose.


got about what data you require but also give the format of expected data

can you show the sample with screen shot


The out put should store in another excel file.


i am not asking where to store but the format

SNo - ColName - Value
1 - colname - somedata
2 - ColName - some Data
2 - ColName - someData
3 - ColName - someData

the first line is header and remaing lines are data

it should be fine right?


check the below file

Compareandformat.xaml (19.4 KB)


I am not able to open this file in UiPath. please help me.


do the same how you did previously like double clicking on it