How to judge the dataTable's all the cell was blank?

How to judge the dataTable’s all the cell was blank?
Like this:
blank, blank

Hi @jmy

(From q in testRow.Select() where string.Join("",q.ItemArray).Trim.Equals(string.Empty) select q).ToArray().Count>0

True->In data table empty row are there.

For More information about Datatable operations


1 Like


If you want check all the cells in the datatable is empty then try like this

(From p In dt.Select
where p.ItemArray.ToList.All(Function(x) string.IsNullOrEmpty(x.ToString))
Select p).ToArray.Count=(dt.Rows.Count)


1 Like

I’m sorry to bother you
But I can’t get your idea?
1.which grammar did you used? db?
2. how can I reply it with uipath activity.
thank you very much


I applied Linq.
You can use this in Assign activity.


use this line?
p.ItemArray.ToList.All(Function(x) string.IsNullOrEmpty(x.ToString))Select p).ToArray.Count=(dt.Rows.Count)

actually it was only one line in the datatable.

it was created like this:
1,read range with head.
2,for eachRow called L
3,use add data column activity ,add L to another datatable.
4,use remove data column activity,to remove the column that I know it was not blank.
5,the column with blank cell was on hold.
so I wank to make sure(judge) it is all blank.
thank you

VersionUP.xaml (1.9 KB)

test.xaml (20.4 KB)

Main.xaml (45.7 KB)