Excel Sheet Modification

Code.xlsx (8.5 KB)
Uploaded excel sheet Contains 3 column (Sold to party , bill doc, invoice no. ), as we can see in image of the there are multiple invoice no for same bill doc. can we modify the sheet to certain output like slash in image
input_file
output

Hi @sunain_chahar

Try this approach

image

dt_Output=

(
	From row In dt_Data
	Group row By
	k1= row("Sold to party").ToString.Trim,
	k2=row("Bill doc").ToString.Trim
	Into grp=Group
	Select dt_Data.LoadDataRow({k1, k2, String.Join("/", grp.Select(Function(gr) gr("invoice no").ToString.Trim))}, True)
).CopyToDataTable

Output

image

Please refer the xaml

LINQ_GroupByConcatColumnValue.xaml (5.4 KB)

thanks a lot it works

1 Like

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