How to remove duplicate entries from excel file

Hi there!
I want to remove some duplicate items from my excel file
My Excel file
My excel file.xlsx (9.0 KB)
The Output I want
output I want.xlsx (9.7 KB)

@Sami_Rajput you can do this with the help of LINQ

see this one minute video, the code is also there on github in the description

HI @Sami_Rajput

How about this expression

(From d In DtBuild.AsEnumerable
Group d By k=d("Torunament").toString.Trim Into grp = Group
Let nj = String.Join(",",grp.Select(Function (n) n("Opponent").toString.Trim))
Let ni = String.Join(",",grp.Select(Function (n) n("Opponent Result").toString.Trim))
Let ra = New Object(){grp.First()(0),k,grp.First()(2),grp.First()(3),nj,ni}
Select r = DtClone.Rows.Add(ra)).CopyToDataTable

Check out this XAML file

GroupByLinq.xaml (10.1 KB)

Regards
Gokul

1 Like

Thanks, @Gokul001
but the column (Opponent and opponent result) are displaying their entries on the same row with Comma separation
I want to display them on separate rows
Like this
output I want.xlsx (9.7 KB)

Check Out the thread : Need help with Excel formatting - #4 by Gokul001

1 Like

Sequence7.xaml (12.1 KB)

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