Deleting Zeros in specific column

Hi guys,

I want to delete if “ColumnName” = 0 then delete this row/s.

In my excelDatas columnname includes like this “0,000”. i want to delete these row or rows.
How can i do that?

Thank you.

Hi @Kuki_Force ,

Have you tried using the Filter Datatable activity to filter only for Non-Zero values ?

1 Like

Use “Filter Data Table” activity and inside it give the condition if column name is 0 then choose “remove” instead of “Keep” in it.

1 Like

Hi @Kuki_Force,

If the value can have variations such as 0, 0.00, 0.000 and the data type is also unknown, you can use the following query inside an Assign activity.

columnName : which is the name of the column that the query will be performed on.
dt : datatable

(From row In dt.AsEnumerable()
      Where Double.TryParse(row.Field(Of String)("columnName"), Nothing) AndAlso Double.Parse(row.Field(Of String)("columnName")) <> 0
      Select row).CopyToDataTable()

Regards,
MY

Hi @Kuki_Force

You can try the Filter data table activity, Refer the image

image

Regards
Gowtham.K

1 Like

Thank you for your help guys. :slight_smile: I appriciate that

Best wishes :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.