Distinct Values from a Datatable

Currently I have program which Generates Output from a excel like file like this
image

I want my Output as
image

Excel File :
test2.xlsx (9.6 KB)

Xaml file :
testnew.xaml (7.9 KB)

Any Answers will be greatly appreciated

1 Like

refer to this @Ishan_Shelke1
testnew.xaml (12.0 KB)

logic

  1. join all rows using “/”
    joinedString = String.Join("/", dt.AsEnumerable.Select(function(row) row(0).ToString).ToList)

  2. split list by “/” and get distinct values
    distinctList = joinedString.Split("/"c).Distinct.tolist()

  3. join list by “,”
    distinctListAsString = string.Join(",", distinctList)

output
image

Hi,

How about the following?

testnew.xaml (9.3 KB)

Regards,

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