I hope you’re well
I am working on a Data Validation piece at the moment. The workbook will contain a column that has National Insurance number in and I am wanting the robot to select the rows where the NI number is missing and copy & Paste them onto another workbook. Instead of getting the robot to filter by blanks and copying the range I was wondering if any of you have done this another way?
You can use linq
Dt.AsEnumerable.Where(function(x) IsNothing(x("yourcolumn")) OrElse x("yourcolumn").tostring.trim.Equals(string.empty)).CopyToDatatable
To accomplish your goal, you can use a LINQ query.
DataTable.AsEnumerable.Where(function(row) IsNothing(row(“columnName”)) OrElse row(“columnName”).tostring.trim.Equals(string.empty)).CopyToDatatable
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.