i have excel sheet having number of columns like (Name,Task,comment,remark,etc)
but in name columns have same name but i want one name for multiple name that is they did not accept duplicate name for that column and merge the other data like task and comment is merge with that name
1 Like
Hii @Shubham_Bidwai ,
Can you please share your sample input and the expected output?
Regards,
Duplicate :
Hi @Shubham_Bidwai ,
Please check this below code,
First assign :-
dt_Final = dt_Input.Clone()
Second assign :-
dt_Final = (From x In dt_Input
Group x By k=x("Name").tostring.trim Into grp=Group
Let ma = String.Join(Environment.NewLine, grp.select(Function(y) y("Task").tostring.trim).ToArray())
Select dt_Final.Rows.Add(New Object(){grp(0)("Name").ToString,ma})).CopyToDatatable()
Hope this helps you
3 Likes
Hii @Shubham_Bidwai ,
Give a try to this.
CombineDuplicateRows.zip (2.6 KB)
Output :
Hope this will help you ,
Thanks
3 Likes
Hii @Shubham_Bidwai ,
whats happening?
@Jithesh_R add more coloumn in sheet and they are also merge
Hii @Shubham_Bidwai ,
Please find the updated workflow .
CombineDuplicateRows.zip (2.9 KB)
Hope this helps
Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.