Group excel records

Sample.xlsx (8.2 KB)
i wants to process the records with same name & date, so how can i achive this?


How about the following using LINQ GroupBy and Dictionary.

dict  = dt.AsEnumerable.GroupBy(Function(r) Tuple.Create(r("Fund Name").ToString,r("Date").ToString)).ToDictionary(Function(g) g.Key,Function(g) g.CopyToDataTable)

dict is Dictionary<Tuple<T1,T2>,DataTable> type.

Then iterate it using ForEach

Sample (8.8 KB)


1 Like

Thanks @Yoichi its working

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