Drop the data row in Excel

Hello My community friends
This is Chenzhixing and come to ask another question again.
My question is. How can I delete the datarow when the number is zero in fifth column.
For example:


and I want change it like this: Colud you see the datarow which has zero number in fifth column has been deleted.
this is my question.
Help please!!!

Hi Chenz - You can use a LOOP and IF condition for column and check if the value is greater than > 0, loop next row and if the value is 0, use Delete Data Row Activity.

@Chenzhixing.PRC

If all the zero rows will be at the end of the data, then you can use delete range activity to delete all rows at once.

Regards,
Karthik Byggari

it is at the end of the data, but the position is changeable. If I will use delete range activity to delete all the zero rows, I must find the position first, but how:cry:

I try it, but the remove data row activity’s properties can not be set, because the colum has different variable type with row.

inside the excel application scope use the assign dtrows(datarow )=dt.select(dt.Columns(5)) then use for each of system.data.datarow type in that use remove data row and in row property of remove data row mention item of for each loop and then after the completion of for loop use write range.

Hi @Chenzhixing.PRC,

Try this:

DeleteZeroValueRow.zip (8.5 KB)

Use Filter DataTable Activity and check Delete option in Output Column Tab.

image

image

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