Combine data in datatable

Hi ,
I have the below input data:
image

I want the data in the below format:
image
Data_Format.xlsx (8.5 KB)

Hi @Yoichi ,

Any inputs from your end would be of great help.

Using lookup we can able to get the data & write in excel

Hi,

Hope the following helps you.

dtResult = dt.AsEnumerable.GroupBy(Function(r) r("Name").ToString).Select(Function(g) dtResult.LoadDataRow({g.Key,String.Join(vbcrlf,g.Select(Function(r)  String.Format(strTemplate, {r("Layer").ToString,r("Name Code").ToString,r("Percentage").ToString,r("Certificate Number").ToString})))},False)).CopyToDataTable()

Sample20220308-3.zip (9.0 KB)

Regards,

I have additional requirement . I have attached the excel for your reference . If for a intermediary there is same layer multiple times the the layer name should exist only once. Please refer intermediary 1 layer 1 in the attached excel
Data_Format.xlsx (8.6 KB)
result.xlsx (9.1 KB)

Hi,

How about the following?

Sample20220308-3v2.zip (21.9 KB)

Regards,

1 Like

Thank you @Yoichi . It worked… :slight_smile:

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