Delete Particular rows in excel using if condition

Hi all,
I have one excel file in that excel i have one column name length if the length <150 I want to delete that particular rows. Could you please help to solve that problem.


You can achieve this by below code

dt=(from dr as datarow in dt where cint(dr.item("Length").tostring)>150 select dr).copytodatatable

where i want to give this condition assign or if condition


Use this in assign, It will give you datatable with rows that have length more then 150

can you solve this error



Let me explain you this.
Once you read this excel file and output the data in datatable.

Using above code, it will give you output as datatable without rows that have length less then 150.

so you won’t get deleted rows rather you get all rows that have length more then 150


you could use Filter Datatable activity.

Delete Rows

blue icon appears because i did not create varible, you will have to supply datatable.


1 Like

Thanks Pankaj

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