Hi, I have a question I hope someone can help me with. I have a column in excel that has many months. How can I filter the data into groups of the same month. Thanks!!!
Hi @Ha_Vi_t
Welcome to UiPath community
DT1 = sampleData.Select((“[month]=‘january’”)).CopyToDataTable
Hi,
If you need to get group of single specific month, FilterDataTable activity will help you.
If it’s necessary to process something for each month, FIliterDataTable with ForEach works.
OR
LINQ GropuBy method also will work.
dict = dt.AsEnumerable.GroupBy(Function(r) r("Month").ToString).ToDictionary(Function(g) g.Key,Function(g) g.CopyToDataTable)
Note : dict is Dictionary<string,DataTable>
type
Regards,
filter_Dt=BuildDt.AsEnumerable.Where(function(r)
r(“ColumnName”).ToString.Equals(“MonthName”)).CopyToDataTable
Hope it Helps !!