Get the count of column

I have a column which is of having 25 rows contains values and empty spaces. Now I need to return the count of the column which has only values.

Hi @agathiyanv

Try this please.

dt.AsEnumerable().Where(Function(row) Not String.IsNullOrWhiteSpace(row(“Column1”).ToString)).CopyToDataTable.RowCount

count is a int32 variable
dt is a name of datatable
Column1 is a name of the column


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.