Get only unique rows


I have an automation that extract a DataTable from a website and need to write to an Excel file, but i need to write only the unique rows based on a column. Example:

DT extracted from website

Name Date
John 01/07/2022
John 01/05/2022
Abigail 01/02/2022

Output to excel file

Name Date
Abigail 01/02/2022

Best regards.

Give try in following

Assign Activity
Lhs: dtResult

(From d in yourdatatablevar.asenumerable
Group d by k=d(yourcolnameorindex).tostring.trim Into grp=group
Where grp.Count=1
Select r=grp.first()).copytodatatable
1 Like

Thanks Peter, it worked just fine.

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