Find all the duplicate rows from excel and add a status as "Duplicate"

Hi all,

I want to check all the duplicate rows in the excel and write a ‘Duplicate’ status in the corresponding column. Then I have to avoid those data’s from further transactions.
(I have also tried using the ‘remove duplicate rows’ activity but not able to use the delete range activity as I am using worksheet activities, not the excel scope activities) . Can anyone help me on this ?

hi

Welcome to UiPath forum

Usually remove duplicate record activity will remove them And will give us the datatable without those records
And it doesn’t require delete range activity

And more than that as we are anyhow removing the duplicate crevices do we really need to update them as duplicate

Cheers @nilloferlatheef1

the problem here is I have already created a sequence with some other activities where i have used file workbook activities. So now am not able to use the delete range activity, and hence remove duplicate activity also

1 Like

Hi @nilloferlatheef1

Check with the below workflow
Based on the requirement you can change the condition
Sample.zip (44.3 KB)

Hope it will work

Regards
Gokul

Fine

You can can still remove duplicate records activity even if you are not using excel based activities
As that activity takes a datatable as input which we can get it from workbook activities as well

So it’s fine using duplicate removal activity

Cheers @nilloferlatheef1

Hi ,
Thanks for this solution.
If I need to compare more than 2 columns, how can i add that here?
row(“First Name”).ToString.Equals(Datatable.Rows(0)(“First Name”)) And row(“Last Name”).ToString.Equals(Datatable.Rows(0)(“Last Name”))

Hi @nilloferlatheef1

You can add it like

row(“First Name”).ToString.Equals(Datatable.Rows(0)(“First Name”)) And row(“Last Name”).ToString.Equals(Datatable.Rows(0)(“Last Name”)) And row(“Age”).ToString.Equals(Datatable.Rows(0)(“Age”))

Based on the requirement you can change the operator “AND”“OR”

Regards
Gokul

Thank you so much.

This issue got fixed. thank you.

Hi @nilloferlatheef1

That’s Great
Kindly mark your solution and close the topic

Happy Automation
Regards
Gokul

1 Like

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