How to merge datatable rows based on condition

Hi @Nisha_K21

=> Use Read Range Workbook to read the excel and store the output in a data table say InputDt.
image

=> Use the below syntax in Assign activity:

OutputDt = (From row In InputDt.AsEnumerable()
 Group row By id = row("id"), name = row("name"), email = row("email") Into Group
 Select InputDt.Clone.Rows.Add(id, name, email, String.Join(",", Group.Select(Function(r) r("token").ToString())))).CopyToDataTable()

OutputDt is of DataType System.Data.DataTable

=> Use Write Range Workbook to write the OutputDt back to excel.
image

FLOW:

XAML:
Sequence12.xaml (8.2 KB)

Hope it helps!!

1 Like