Need to filter some rows and skip the last column. Filtering rows can be easily done but How to skip the last column from getting included in the ouput data table by using LINQ?
And in general if there are large number of columns How can one skip the desired columns(say only 5 columns to be skipped out of 150)?
The above task is very easy using the filter data table activity, but when the data table is very large 600K rows and 150 columns, LINQ becomes necessary (isn’t it?).
Working with DataTableVar.DefaultView.toTable(False, arrColSet)
arrColSet can be done by
DataTableVar.Columns.Cast(Of DataColumn).Select(Function (x) x.ColumnName.Except({“Col1”,“Col4”,“Col34”}).toArray