Group two columns


i have attached the screenshot (excel),where i have followed the below steps ,
1.used read range to read the excel
2.for each row datatable can anyone help me do this further

Hi @priyankavivek what you are trying to do … if you can explain what you want from the that excel data then we can suggest more clearly.

i need to get the output as shown in screenshot, i need to remove the duplication of invoice number ,and group the 2 columns

Hi @priyankavivek Check this xaml and let me know

_test.xaml (41.1 KB)


1 Like

Hi @priyankavivek

Take assign and paste below linq code in it,
DT1 (Type DataTable) =

(From p In dta.DefaultView.ToTable(False,"Invoice Number","PO Number","GRN Number").Select Group p By Invoice=Convert.ToString(p("Invoice Number")) Into GroupA=Group Let x=GroupA(0)("Invoice Number").ToString+"|"+String.Join(",",(From p In GroupA Select Convert.ToString(p("PO Number"))).ToArray)+"|"+String.Join(",",(From p In GroupA Select Convert.ToString(p("GRN Number"))).ToArray) Select dta.DefaultView.ToTable(False,"Invoice Number","PO Number","GRN Number").Clone().Rows.Add(x.ToString.split("|"c))).ToArray.CopyToDataTable()


here’s the workflow for your understanding.

groupByDisplay.xaml (9.0 KB) :slight_smile:

i will check and reply on that

okay @priyankavivek

thanks for your reply i will checkon this:slightly_smiling_face:

i need to fetch the data from excel …please help on this

Okay, for that just use read range instead of Build DataTable activity and pass dta (DataTable variable as readRang’s output variable) @priyankavivek

thankyou so much

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