How to create two new datatables only with rows that have content?

can be done with grouping data

Assign Activity
LHS: TableList | List(Of DataTable)
RHS:

(From d In YourDataTableVar.AsEnumerable
Where {"REPORT","TYPE OF CLIENT"}.All(Function (x) Not (isNothing(d(x)) OrElse String.IsNullorEmpty(d(x).toString.Trim)))
Group d By k=d("Area").toString.Trim Into grp=Group
Select t =grp.CopyToDataTable).toList

Then iterate over the returned TableList and process the different datatables

Also have a look here:

Describing also non-LINQ Approaches which you can combine with filter approaches

2 Likes