Remove duplicates from excel file


How to remove duplicates in region column…i.e.,AAA
Thanks…

Hi,

You can use filter datatable activity and in the condition you can remove the duplicates row.

I will try it,thank youu

I hope there is no duplicate ROWS in your excel image
But still to remove the duplicate records in a excel use read range activity and get the output with a variable of type datatable named dt and We can use REMOVE DUPLICATE ROWS activity

Cheers @narayan_swamy5a6

I usually use a list variable and check if row value is in this variable, then skip the row, if not - I add value to this variable and read row

@narayan_swamy5a6

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,"Region").CopyToDataTable
  1. And then use Write Range activity to write into exel file and pass that newDT as input to it.
1 Like