Find empty column name in datatable

Hi @Arettu63

→ Read Range Workbook
Output-> dt
→ Use below syntax in Assign

columnsToCheck= {"Name","Age","City"}
List= (From row In dataTable.AsEnumerable()
                Let index = dataTable.Rows.IndexOf(row)
                Let emptyColumns = columnsToCheck.Where(Function(col) String.IsNullOrEmpty(row(col).ToString())).ToList()
                Where emptyColumns.Count > 0
                Select "Index " & index.ToString() & ", columns " & String.Join(",", emptyColumns)).ToList()

columnsToCheck is Array(System.String) and List is of DataTyp System.Collections.Generic.List(System.String)

Regards

1 Like