Unable to delete row in excel

Hello,

i need to dlete row of excel if error is there while writing data in excel.


i am getting data fro api from jira tikcets and u can see in above image key retrived but work order not retirved as field is not there in ticket.
so in that case i need to delete that specific row and i am using delete rows in catch section if any error in try to write data in jso prsing then will go to catch and delete row.

but issue is it is not deleting.
still i can see key colulmn.
what is the issue?.
help me on same.

@Mathkar_kunal

You will have to choose Specific Rows and pass the range of the rows to delete like the below

1 Like

Hi @Mathkar_kunal

I assume that the data you are showing in excel in your screenshot is the one you are writing?

If yes, before writing it to excel itself, check the data if order column value is null/empty, then don’t write that row in excel.

If you are using datatable to write data in excel in bulk, then use filter datatable activity to remove the rows where work order is null/empty and then write the filtered output in excel.

Hope this helps.

1 Like

on which basis we need to give position like 3-5 as i have counter to write data in excel and excel may have 5 liens of data or 10 or any count.
will increase row by row u ca see that in delete row activity ss

@Mathkar_kunal

Deleting the excel rows while iterating will change the row indexes and will result in issues

You may follow this approach.

  1. Process your whole data, let the status blank for the row which failed into catch section
  2. At the end or end state, read the excel data into datatable
  3. filter data table
  4. Remove empty status datarows
  5. now clear the excel file data
  6. write this filtered data to the excel file.

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