Compare each line of row of 2 excel file

Hi, I am having a problem comparing each row of the column of 2 excel files. I want to know if each cell (same row) is the same. If it same I want to write on the new cell that they have the same value if not it will be vice versa.

image

as you can see the other data table’s index is not incrementing which results in comparing on another row index of the other table.

here is my code

Hello @Tmo ,

One possible approach would be to use the Lookup Data Table activity in order to easily compare the data.

For a better understanding you could check the example from the bottom page of this topic https://docs.uipath.com/activities/docs/lookup-data-table

Hope it helps you solve the issue!
Best regards,
Marius

Can you give example? sorry im just new and having a hard time to understand.

what I want to happen is like this:

Excel 1
Amount (Column Name)
12
31
10
5

Excel 2
Amount (Column Name)
12
32
12
5

check if 1st row is the same
12, 12 = YES
31 , 32 = NO
10, 12 = NO
5 , 5 = YES

YES/NO value will write on the new cell of one of the excel file.

Hi @Tmo Could you check this example?

CompareColumn.xaml (13.7 KB)

Hi @Tmo ,
I am sending you the workflow for your reference which will provide you the highest accuracy do have a look at the excel file.
New folder (3).zip (8.9 KB)

Thanks & Regards,
Shubham Dutta

sorry not this one. this one copare 1st column 1st row to all rows of another column. what I need is compare rows that faces each other.

how to do it if i have two excel file?

@Tmo Use a lookup data table activity

no working bro since it will check all the rows of 2nd data table. what I need is check each value with the same rows only. like index 1 of DT1 and index 1 of DT2 and so on

@Tmo check this one:

CompareColumn.xaml (13.7 KB)

still not bro. DT1 is looking for similar value from DT2 before incrementing its value. What I want is DT1 and DT2 will increment each loop so even the same level or rows are the same or not.

@Tmo can you check again

CompareColumn.xaml (13.7 KB)

thanks for the help bro. I found a solution. I used if statement inside the Do While Loop. It increments each index of two Data table and compare it :slight_smile:

Thank you so much…happy automation :+1:

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