I have a customer data in which der z a column name called “state” however my task is to segregate different states data in different excel sheet !
In this case, LINQ GroupBy and ToDictionary will help you.
dict = dt.AsEnumerable.GroupBy(Function(r) r("state").ToString).ToDictionary(Function(g) g.Key,Function(g) g.CopyToDataTable)
note: dict is D
Sample20230320-2L.zip (3.0 KB)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.