Read a excel contains three column (Name, DOB and amount) and group the excel data in to two based on th age. If the age less than 18 then write the correxponding row to a new tab (minor) in the same excel and others will be in another tab (major). Group all the rows like this
Use read range to read the excel data.
Assign:
minorRecords = originalDataTable.AsEnumerable().Where(Function(row)
DateTime.Now.Year - Convert.ToDateTime(row("DOB")).Year < 18).CopyToDataTable()
Assign:
majorRecords = originalDataTable.AsEnumerable().Where(Function(row)
DateTime.Now.Year - Convert.ToDateTime(row("DOB")).Year >= 18).CopyToDataTable()
Use write range activity to write the data into excel (New sheets and delete the previous sheet)
- Read the data into datatable
- Use a filter datatable activity and give the filter as Age>18 …and write the datatable back to excel…
- Repeat same for the Age<18
- If you dont want age column in the filter datatable you can mention the Age column in the columns tab and sepect remove…it would be removed after filtering
Cheers