Hi everyone, im new here in automation. may I ask how to remove duplicate records using csv file?
Thanks
1 Like
- Use Read CSV activity to read data from csv file and will give you output as DataTable and say it āDTā.
https://docs.uipath.com/activities/docs/read-csv-file - Then use the remove duplicate row activity.
https://docs.uipath.com/lang-ru/activities/docs/remove-duplicate-rows
Hope this helps.
Hi @Louize_Ayuste
Please follow these steps.
- read csv.
- The DefaultView property returns a DataView you can use to sort, filter, and search a DataTable.
For Example :We can use the simple DefaultView Code to To Remove Duplicates From Datatable In UiPath
dataTable new_dt =
old_dt.DefaultView.ToTable(True)
Note:
Useful when we are removing duplicates with respect to every āColumnā
Hi @Louize_Ayuste,
- Use the āRead CSVā activity to read the CSV file and store the data in a DataTable variable.
- Use the āRemove Duplicate Rowsā activity to remove duplicate records from the DataTable variable. This activity removes duplicate rows based on all columns in the DataTable by default, but you can also specify a particular column or set of columns to remove duplicates based on.
- Use the āWrite CSVā activity to write the cleaned DataTable variable back to a CSV file.