How to delete a row in excel based on condition


Can you please let me know how to delete a row in excel based on condition.
Requirement is like there are few customers like Customer1,Customer 2,Customer3 and Customer 4 as per attached. Now I want to remove the entire row if Customer details has customer1 and Customer3

I’m not sure how to use remove date row over here for this requirement. Since this as a priority if some one help asap will be greatful.

Attached the excel sheet and xaml file.

SatheeshCustomerDetails.xlsx (8.7 KB) customerdelete.xaml (8.7 KB)

@asatheeshk21 Can you check this Workflow, I updated a bit :
customerdelete.xaml (11.3 KB)


Thanks for your input on this, But the xaml you shared is storing in separate sheet.
Also I just created for sample to put in the group. It wil be helpful to know how to use remove data row to get it deleted from the same excel which the way i created.

@asatheeshk21 The Sheet Name you can change and put the sheet name of your choice. And the method of Remove data row in the way that you were performing won’t be possible because you are Looping over the Datatable and trying to remove the rows in the same datatable which will result in an Exception. If you Still want to Remove rows using Remove Data Row, you can do so using the method provided in the Below workflow. But it has an Extra step and Iteration Time Consumption compared to the Last workflow which had only an Assign Statement. You can Choose what is best for your purpose.
customerdelete.xaml (8.2 KB)

I have used a new Sheet name so that the original data still remains the same. (Just for Backup) :sweat_smile:


Thanks it got worked.

1 Like

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