how ot rmeove duplicates from a datatable read from an Excel file?
I tried with REmove duplicates but doesn’t work.
kindly try with remove duplicate rows activity
we can use this expression
dt = dt.Asenumberable().Group(Function(a) a.Field(of string)(“yourcolumnname”).ToString).Select(Functions(b) b.First()).CopyToDatatable()
I had a similar issue, have a look through some of the replies to one of my posts.
If you have any questions, feel free to ask
Thank you so much @Palaniyappan.
For the second option how in case of multiple Columns to insert as columnname?
but for this case REMOVE DUPLICATE ROWS will work actually
where you facing any issue in that
When I write it back in excel it appends the row continuosly so doesn’t cancel the duplicates.
can i have that excel sample if possible
Indice_13-11-2019.xlsx (8.6 KB)
Can you please help me?
here you go
if this is not the excel you want
kindly share the output excel you want
cami.zip (16.3 KB)
Try this query
(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()
Duplicate records from the same data
And then use remove duplicate rows
I would like only one row at the end, if at the beginning there are multiple.
To remove duplicate from excel you can use this one . I don’t know if it is useful or not…
Thank you @Palaniyappan.
I would like to have file with no rows duplicated.
With your workflow the excel file, in case of 4 identical rows, maintains them at the end.
How to have a file ith no duplicates, but only one row?
Usually duplicates in excel will be searched along each rows in it
So to group them we can take a common column, a primary column based on that we can group them
Is there any column of such kind