Deleting Empty Rows Using LINQ Cast Function

Hi @NILESH.BOT369

Can you try the below syntax:

DT.AsEnumerable().Where(Function(row) Not row.ItemArray.All(Function(cell) cell Is DBNull.Value OrElse cell.Equals(""))).CopyToDataTable()

Input:


Output:

Regards

1 Like