Excel in UI path

datatable
excel
activities

#1

Hi ,

How to check the column is empty??


#2

string.Isnulloremty(row(“columnname”).ToString)

Or

row(“columnname”).ToString=String.empty


#3

Hi @vikumars,

string ColumnName = “Column Name To be checked”

Boolean result = (From row in dt.Select()
Where Not String.IsNullOrEmpty(row(ColumnName).Tostring)
Select row).ToArray().Count > 0

If the above query returns True then the column contains some non empty/null values. False then it contains only null/empty values.

Note: There are many ways to find it.