Remove Duplicates Specific Column

ı want to remove duplicates just “year”,“month”,“customer no” columns in my data
ı want to this for my data

how can ı do that in uipath?

dataSample.xlsx (9.5 KB)


Hi @burcu_argun

Give an assign activity

NewDt=(From p in dt.Select() where( From q in dt.Select() where string.Join(",",q.ItemArray).Equals(string.Join(",",p.ItemArray)) Select q).ToArray.Count>1 Select p).ToArray.CopyToDataTable()

then go to Output Datatable activity and print the string variable

Ensure it is removed

Ashwin S

ı tried but it’s not working

Hi @burcu_argun,

You can use remove duplicates range and the read the sheet.


ı can’t because maybe “ID” and “Customer name” colums can has different value in excel

Hi ,

Use this activity to remove the duplicates from excel.


1 Like

This link may help you,

but ı want to work if same row duplicated data for 3 colums, ı don’t want to it will only work if the entire row contains duplicated data

Give a try on following

(From d1 In dtData.AsEnumerable
Group d1 By y=d1(“year”), m=d1(“month”), cno=d1(“customerno”) Into Group
Where Group.Count = 1
Select Group.First()).CopyToDataTable

it should retrun all rows that have an unique year, month, customerno combination

please update variabl names and columnreferences accordingly to your scenario

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