How to remove multiple rows having certain conditions from a data table

Hi Team,
I am working on a scenario where I want to filter out values from multiple columns before writing in in .csv. I want to delete rows that have empty values, or zero values. The data table consists of 10k+ records.
Plz help me out in this regard.
Thank You,

Regards enthusiastic

@enthusiastic

Did you try LINQ Query?

i have tried but failed. there is no repetition in the data table. there are some empty fields and zero values. I want to remove them

If you want to check the content of only one column, for example ColumnA

(
From row In Excel_DT
Where (row("ColumnA").ToString.Trim <>"" Or row("ColumnA").ToString.Trim Is Nothing)
Select row
	).CopyToDataTable

If you want to check another column, for example ColumnB also

(
From row In Excel_DT
Where (row("ColumnA").ToString.Trim <>"" Or row("ColumnA").ToString.Trim Is Nothing) And (row("ColumnB").ToString.Trim <>"" Or row("ColumnB").ToString.Trim Is Nothing)
Select row
	).CopyToDataTable

And so on you can do it for each column you want to check

Hi,

Can you try the following expression?

dt = dt.AsEnumerable.Where(Function(r) r("yourColumn") isnot Nothing AndAlso (Not (String.IsNullOrWhiteSpace(r("yourColumn").ToString) OrElse r("yourColumn").ToString="0"))).CopyToDataTable()

Regards,

Dear @enthusiastic,

Kindly go through the below link, it will help you.

Regards,