Overwrite Excel Value

Hello, I have tried various method but cannot find the solution for this issue. Appreciate any help given.

Situation:
I have an input file whereby bot will run the process and write the outcome in a column, whether ‘Success’ or ‘Failed’. In case it fails in several rows in between, user will delete the ‘Failed’ column so that the bot can rerun. So how to ensure that when the bot rerun, it will process the empty row and write the status in the same row again.

Issue:
The input file have more than 500 rows. If there are already 100+ processed row at the top of the file, it will take time to traverse when using For Each activity. While traversing, my system application will timeout and will cause process error. So I used filter datatable. It works, but might cause issue when overwrite second time.

Example of input file after user delete the failed value:
Success
//empty
Success
Success
//empty
//empty
Success

Apologies if my explanation is not clear.

@hanani.azman,

If you have unique column to identify rows, you can use below approach.

  1. Read the data into DataTable variable.
  2. Filter status=empty rows only
  3. Process the row
  4. Use Excel process scope to find the row with the unique reference.
  5. Step 4 will give you the excel cell address from which you have to get the row number
  6. Use write cell activity to update the Status

Thanks,
Ashok :slight_smile:

1 Like

Hi @ashokkarale, thank you for responding.

I have found my own solution with another kind of workflow but your step 5 definitely is an eye-opener to where I am stuck at.
With that as reference, I managed to overcome this blocker.
I really appreciate your help.

Best regards,
Hanaz

1 Like

@hanani.azman,

That’s great :+1: Happy automation!!

Thanks,
Ashok :slightly_smiling_face:

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