How to compare rows in two different excel

hello all,
i am comparing the data in two different excel files and each of them has thousands of rows. for each row in excel 1, if the data of the first two columns doesn’t exist in excel 2(and the 1st and 2nd column of each row need to be exactly the same as excel 2,not just exist but mixed between different rows ) , i need to write these rows in another new excel, how could i do this with uipath? thanks.

hey @june, sorry attached logic would be the correct solution. Please ignore my earlier post.
CompareExcel.xaml (9.0 KB)


@vvaidya thanks a lot, i’ll try this.

solution updated

@vvaidya thanks a lot, i will try the updated one.:grinning:

@vvaidya excuse me, could you please explain some logic details of your sample? i didn’t understand assign"dtcount", when"count<dt1.Rows.Count", use “activity”, does it same as “for each row”? thanks a lot.

It is a variable(Int datatype) to store the Datatable rows count.

it is Do-while Loop construct.The do-while loop is a variant of while loop, which evaluates the condition at the end of each loop iteration. With a do-while loop the block of code executed once, and then the condition is evaluated, if the condition is true, the statement is repeated as long as the specified condition evaluated to is true.

For Your Reference -
For Each


got it, thanks a lot!