Delete row that column Name = #N/A

I want delete row that column Name = #N/A

Please guide me about it.

My data have 10K.

Hey @fairymemay ! I’m assuming you already have this data in a datatable variable.You can filter your datatable by selecting the rows that have different values ​​than “#N/A”! Try This:

Assign a new variable of type datatable.

(From r in SampleDT.Select()
Where Not r("YourColumnName").ToString.Equals("#N/A")
Select r).CopyToDataTable

Hope it helps!

So basically you want to delete coloumn name NA right @fairymemay

You can go with filter datatable activity

Or if you want to delete that rows of specific column

DT = DT.AsEnumerable().Where(Function(row) Not(row(“Your column name”).ToString.Trim.Contains(“#N/A”))).CopyToDataTable

@fairymemay hope this helps

Hi @fairymemay ,

If you are using a Workbook Read Range Activity then do give @nikhil.girish 's solution a try.

If you are using an Excel Application Scope, then chances are the #N/A is converted into its integer equivalent like so:

image

If that is the case, then this ought to help you out:

dt_sampleData.AsEnumerable().Where(Function(w) Not w(ColumnNameorIndex).ToString.Trim.Equals("-2146826246")).CopyToDataTable() 

Kind Regards,
Ashwin A.K