I would like to use a for each to say use the row that contain text but unsure how to configure that in the for each - I think I will need an IF statement but unsure how to edit code to say if row has text
For Each Row in dt
If String.IsNullOrEmpty(row("ColumnName").ToString) = False
// Do something with the row that contains text
// You can use row("ColumnName").ToString to access the text in the row
End If
The dt = dt.AsEnumerable.Where(Function(r) System.Text.RegularExpressions.Regex.IsMatch(r(“ColumnName”).ToString(),“[A-Z]+|[a-z]+|[0-9]+”)).CopyToDataTable code works wonderfully thank you!
This specific example: How would I configure the for each to say : for each row that does not contain "
if not currentrow(0).toString.contains(“”“”) '<-- 4 times double quote, or use chr(34) instead of the 4x quotes)