Delete empty rows in excel

Hi @Aregala_Yedukondalu ,

Could you try with the below Expression :

DT = DT.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or String.IsNullOrWhitespace(field))).CopyToDataTable()

Here, DT is the datatable retrieved from Database.

To Handle errors with Direct CopyToDatatable, Check the below post :