Remove duplicates row from multiple column

hi guys i want to remove duplicate rows from a datatable using 2 columns as comparator.
example :
i want to remove the row if col1 and col2 is duplicate

output :
how can i achieve this ?


Try these steps:

  1. Use Read Range activity to read data from excel file and will give you output as DataTable and say ‘DT’

  2. Then try this expression toremove duplicates:

                 newDT = DT.DefaultView.ToTable(True,"col1","col2").CopyToDataTable.
  3. And then use Write Range activity to write into exel file and pass that newDT as input to it.


Hi @RobertoEwaldo
If you are using UiPath version 19.7.x then just write like this–>
NewDT=DT1.DefaultView.ToTable(True,“column 01”,“column 02”).Copy


1 Like

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