Remove data row in a Datatable

Hi Guys,

i want to remove blank row in an ExtractDataTable from PDF.

I did data scraping in a PDF, when i run the file using for each, am getting blank data as the pdf is empty in first row. i wanted to remove this blank data and also i wanted to delete the specific row element which is not required in my project.

Am using latest version uipath 20.4.1

@Vinutha_L I think you can give a try on this Linq Query. Which Removes the Empty rows and gives you Only rows with data.

yourDT.Rows.Cast(Of System.Data.DataRow).Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(""))).CopyToDataTable()

Hi @supermanPunch, Thanks you!

I used the given query, am getting an error saying CopyToDataTable is not a member of System.collections.generic.IEnumerable(of Sysytem.Data.DataRow)’

@Vinutha_L Can you Check this Workflow :
I have used a Build Datatable with one Blank row.
It uses the same query. There might be an extension that needs to be added to your xaml file if the Query is identical and Still Not Working in your xaml.
Datatable_RemoveEmptyRows.xaml (9.4 KB)