Count elements in the row

Hi Guys,

I have a row in the excel which has some data.
Now I need to find the count of the not null cells from the row.
From the below example I need the output as 6.

I tried readrow and got the values, but not having the idea how to eliminate the null values.
Could you guys please give a suggestion how to do it.

image

1 Like

Hi @ereddy068

Check this

DataTableName=DataTableName.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(“”))).CopyToDataTable()

Thanks
Ashwin S

Hi AshwinS2,

I am using ReadRow activity to read the row and it doesn’t support Datatable right.

Fine
hope this example would help you on how to find a null value along all columns in a row
coun.zip (8.5 KB)

Cheers @ereddy068