We can get excel data in datatable using read range activity, lets say 1st excel data as dt1 and 2nd as dt2.
by using following code in assign you’ll able to get unmatched rows.
dt1.AsEnumerable().Where(Function(row) Not dt2.AsEnumerable().
Select(Function(r) String.Join("",r.ItemArray)).Any(Function(x) x = String.Join("",row.ItemArray))).
And to get matched rows, just remove
Not from the code.
Above code basically search for rows from dt1 into dt2, so to get common rows, there’s no problem but to get unmatched row you have to search rows from
dt2 as well as
dt1 and merge both data’s.
Here I’m attaching sample workflow for your better understanding —> DataRowCompare.xaml (11.3 KB)
Note —> first check both build data table’s data and then run the workflow. In first MessageBox you’ll have common rows and 2nd MessageBox with unmatched rows from both data.