Here in my data table I want to remove 1st, 3rd and 4th rows as the rows are having empty cells. How to do that. Please help.
Hi @Abhi15
you can use select as Datatable.Select(“[Column3] is null”) = Datarow
(type as datarow) now use for each activity to loop through the datarow , inside for each use remove data row activty.
Hi @Abhi15
Please Try this
dtTable - datatable
dtTable = dtTable.AsEnumerable.where(Function(row) row.ItemArray.All(function(col) not string.IsNullOrEmpty(col.ToString))).CopyToDataTable
Thanks
Hi ,
You can as well use Filter datatable activity on empty columns to get rid of those rows.
Thanks,
Geetishree Rao
Hi prasath
The above code is working fine.
Can you explain me the above code, looks like it is vb.net. I’m new to uipath and don’t know vb.net
Thanks.
@Abhi15 It is Linq query. The query is iterating through each row in data table (AsEnumerable). In each row it is checking if each column value is not null. The entire output is copied to data table (copytodatatable) and assinged to data table dtTable.
Thankyou @prasath_S and @MEHER_BJ .
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.