How to delete Empty Rows in Excel

hey guys,

Tried this method In_BaseDataTable.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(“”))).CopyToDataTable()

i’m getting erro like ‘Datarow’ is Ambigiuous imported from namespaces or types ‘xceed.wpf.datagrid.,system.datatable’

Hi
we can do this with a select method itself like tihs
yourdatatable = yourdatatable.Select("[yourcolumnname] <> ‘’ ").CopyToDatatable()

this will fetch all the rows which are not blank
Cheers @Pradeep_Shiv

so here we are remove only one particular column empty rows??
what if i want more than 3-4

no its like one column has empty row value, all the columns which are adjacent to it will get deleted as well right

Cheers @Pradeep_Shiv

Assign: Cannot perform ‘<>’ operation on System.DateTime and System.String. @Palaniyappan

may i know the datatype of that column
this would work actually
for more details on ths

Cheers @Pradeep_Shiv