Filter excel data where duplicate data in each column to remain the same

Hi Experts,

I am working on a project that is filtering excel data where data are the same between two column.
We need to leave these same data and remove the rest where two comparing data are not the same. Mean as in attached image, we will leave the highlighted data rows in excel and remove the rest.
We tried to use for each row in that dt and use filter datatable activity. but we can’t achieve it yet. Let me know any solution for this. Thanks.


Hello @Htwe_Ko_Ko_Wynn my approach to this use case would be something like this. First read the excel into datatable (dt_filter) and then add a datacolumn to dt_filter lets call this column “Remove”. Then do a for each row of dt_filter, inside it an IF activity, condition row(“ProjectID”).ToString.Trim = row(“ID1”).TroString.Trim Then Assign row(“Remove”) = False Else row(“Remove”) = True
After the for each row, assign to datarow variable datarowtodelete = dt_filter.Select(“[Remove]=‘True’”)
After this, have a for each activity, for each item in datarowtodelete. Inside it an invoke method, target type (null), targetobject = dt_filter.rows, methodname = remove After this, remove the “Remove” column using remove data column activity. Then write back dt_filter to an excel

@Htwe_Ko_Ko_Wynn
find starter help here:
FindDupsUniquesFirstFromGroup_By2Cols.xaml (12.4 KB)

Hi ppr,

thanks for your example, btw is there any example of comparing two excel files and extract the row record which is in different. Then i will insert as new row to Mapping.xlsx.
If you have suggestion or an example workflow, please provide me and many thanks for your help.

ByDesign_Tasks_Collection.xlsx (20.0 KB) Mapping.xlsx (22.9 KB)

have a check on your mesages

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