(From p In DT1.AsEnumerable()
Group p By
c1=p("Column1"),
c2=p("Column2")
Into Group
Select DT1.Rows.Add({c1,c2,Group.sum(Function(x)
convert.ToInt32(x("Column3").ToString))})).CopyToDataTable
You can follow the below steps to achieve it,
→ Use the Read range workbook activity to read the excel and store in a datatable called dt_ExcelData.
→ Then use the assign activity and create a list of String datatype variable called List_UniqueValues. Then give the below expression,
→ After assign activity use the For each activity to iterate the each element in the List_UniqueValues.
→ Inside for each insert the for each row in datatable activity to iterate the each row in the dt_ExcelData.
→ Inside For each row in datatable activity insert the If activity and give the below condition,
→ Create one more List of String datatype variable called List_ProcessedValues.
→ After assign activity use the Append items to collection activity to append items to List ‘List_ProcessedValues’.
→ After for each activity insert the Write range workbook activity to write the output datatable to excel.
Check the below workflow for better understanding, Main.xaml (14.2 KB)