Datatable data manipulation - Structuring the table

Hi Team,

I have the data in a data table as follows:

Name Age Place Description Vendor
User 1 23 Pune This is UiPath
a description for
user one
User 2 24 Mumbai Demo of re UiPath
quirements
User 1 25 London UiPath is a autom UiPath
ation tool
User 1 26 Boston User four be UiPa
longs to the Boston th
in USA
User 1 27 Delhi This is the la Ui
st example to Pat
make this line comple h
ted

And I want a data as follows:

Name Age Place Description Vendor
User 1 23 Pune This is a description for user one UiPath
User 2 24 Mumbai Demo of requirements UiPath
User 1 25 London UiPath is a automation tool UiPath
User 1 26 Boston User four belongs to the Boston in USA UiPath
User 1 27 Delhi This is the last example to make this line completed UiPath

Please help me with the same. EXPERTS please help me - @yoichi, @Hiba_B , @Pankaj.Patil

Thanks and Regards,
hacky

PLease help guys - @prasath_S , @Hitesh1

Hi,

Hope the following helps you.

Sample20210623-2.zip (9.8 KB)

Regards,

1 Like

Duplicate of:

group by on 2 cols:

(From d In dtData.AsEnumerable
Group d By k1=d("Name").toString.Trim,k2=d("Place").toString.Trim Into grp=Group
Let dc = String.Join("",grp.Select(Function (x) x("Description")))
Let vc = String.Join("",grp.Select(Function (x) x("Vendor")))
Let ra = New Object(){k1, grp.First()("Age"),grp.First()("Place"),dc,vc}
Select dtResult.Rows.Add(ra)).CopyToDataTable

@Yoichi

Thanks alot mate! I really appreciate it.

As usual, your solution was ideal and accurate in my case!! :yum:

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