How to judge the dataTable’s all the cell was blank?
Like this:
column1,column2
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
Regards,
Arivu
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)
Regards,
Mahesh
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
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