How to delete rows in excel

Hi guys,

I am trying to delete particular rows in the excel sheet but in a simple way because I am getting an error about the index.

May I please ask if I can get some assistance. Thank You.

This is the code:

And below I have the rows I want deleted that contain numbers 100420,100410 and 100400 under the GL Account column and that have the contain CORE under Object Key column:

gl account table

@wendy What is List? I think it Should be rowsToDelete instead of List if the naming of variable is related to the actual data :sweat_smile: Also the error that you get is with the Assign - Remove GL Accounts, Can you Show us the expression used in it, and also tell us why are you doing that?

Hi @supermanPunch

I am not sure if these screenshots could help with the requested expression:

The intention was to delete the rows that have GL Account numbers (100400,100410 and 100420) and rows that contain the word CORE.

To avoid gaps, I usually do this:

  1. read spreadsheet
  2. filter datatable
  3. archive old spreadsheet
  4. create new from filtered table

@wendy I actually have to see the whole workflow to understand it better, the variables data, dtDataToBeDeleted are Datatables right ? If so, What is the difference between these Two DT’s.

If possible can you provide the workflow?