Please help me for the requirements:
- Compare identical columns. For e.g. if Column A from Sheet1 and Column B Sheet2 matches then do the following
- append as “matched” in the Cell Value in sheet2.
Please help me for the requirements:
Welcome to our uipath community.
There are many posts releated to this in forum. Could you please look into it one by one.
https://forum.uipath.com/search?q=Compare%20two%20datatables
The above link is close what I am looking for…but there are some below changes to it…
Appreciate your help and support on the same.
Hi @sshussa,
I’ll suggest you to follow the steps below.
create output index variable for both For Each Row —> ind1 & ind2
Two For Each Row —> to iterate through datatables. (but 1st for each row will iterate for every item in sheet2 like Cross product Cartesian for that we can use those indexes)
these index variable are to assure index of both of the iteration. So if iteration index is same then it’ll check for the condition.
Condition row1(0).ToString = row2(0).ToString —> will check for the data.
two assigns used accordingly to write result. (As shown in screenshot 1)
That’s it
Thanks a lot, Samir.
What if I need to send an email with the records data only for those matched results in the end?
Here is my example:
Sheet1 | Sheet2
Col ID | Col ID, Col Name, Col Email, Col Amount, Col Results (this is the status col for match or not).
Condition: if Col ID from sheet1 matches with Col ID from Sheet2 then do as the following:
Also, Would you please kindly share an example with the code.Thank you very much.
Warm Regards.
hai samir could you attach the xaml file
Any one would share the xaml file that would be super helpful.
hi @anwar_sd,
@sshussa, after adding findings (Matched Or not) in next column, using Filter Data Table activity, we can get row with matched result. And then using for each row on that filtered dataTable you can mail those one by one.
here I’m attaching example for your better understanding,
—> Compare2dataColumns.zip (21.2 KB)
Just have a look in excel data of sheet1 & sheet2 and run it.
sheet1 —>
sheet2 —>—>
Thanks Samir for your help and support on the same
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.