Compare row from one data table in another

I need to check each row of first datatable in second datatable and if match is found based on primary key coloum value,then cell by cell comparison needs to be done for rows of both data table.Can anyone explain the logic for it?

@rahul_kumar4 Welcome to Uipath community!

  1. You can use two for each loop activity and a if condition activity for comparison

  2. You can use a for each loop and a filter data table activity

  3. You can also use LINQ for comparison

Best Reagrds,
Vrushali

Hi @rahul_kumar4 ,

please find below a step b y step tutorial to do this .

How to Compare Two DataTables in UiPath (Automatically Compare Excel Sheets) (linkedin.com)

If i need to check first that first row of datatable 1 is present in datatable 2 or not,then how we can write the logic for that,because in my data there is a possiblity that row present in 1st datatable might not be present in second

Hi @rahul_kumar4

Welcome to forum

Linq seems a better option here

So for the linq query

Check this blog by @sharathraju489

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

2 Likes