How to count duplicate rows in a column of the same excel sheet and write it to the new excel file

@enthusiastic

prepare the report datatable with build datatable activity - 2 Cols: Column A, Column B - dtResult

Use an assign activity:
left side: dtresult
Right side:

(From d in YourDataTableVar.AsEnumerable
Group d by k=d("Column A").toString.Trim into grp=Group
let ra = new Object(){k, grp.Count}
Select dtResult.Rows.Add(ra)).CopyToDataTable

Also Have a look here:

1 Like