How to continue execution from next row in excel

Hi all,

image
This is sample file, if Col A , Col B processed and stored in Col C
In between any error occurs or in between execution stops, the execution should start from next row i.e, here in example 3rd row how to do.
I tried using changing range in read range activity but its not working.
What changes I need to do.
Please help.

Thanks & Regards,
Lakshmi

Hi @lakshmi.mp ,

As you are updating the col C as “Processed”, you can have an if condition to check whether col C is null

Hi @Dharunya_Devi ,

Excel file has say 50 records. I’ve procesed 10 records and updated as “Processed”.
Suddenly error occurred and execution ended.
Again I’ll run my workflow, execution starts from row 1 .
This should not happen , I need to execute from where the execution stopped .

Regards,
LAKSHMI

Hello,

you can use a try catch and then the continue activity to carry on when an exception occurs or you can filter your Datatable that comes out of the read range to only contain rows that do not contain processed in column c

1 Like

Hi @lakshmi.mp,

Have an if at the beginning of the loop saying if Column C = “Processed” then Continue. This will skip all iterations already done and leave the automation at a place where it hasn’t processed that row.

https://docs.uipath.com/activities/docs/continue

Best,

1 Like

Hi @lakshmi.mp ,

There are few ways of handling this scenario,

  1. Add items to queue which will solve this issue.
  2. Use RE-Framework, so even when the exception occurs it will move to next transaction without stopping the execution.
  3. If you are using excel as input, try updating the processed rows in different sheet which will resolve this issue.
1 Like

You should create a dispatcher automation that loads the spreadsheet into an Orchestrator queue.

Then create a separate performer automation that pulls from the queue and processes the items.

This is how you manage picking up where you left off, knowing which items were already done, etc.

RE Framework is overcomplicated overkill. Yes, use a queue. But write your own automation with error handling etc because it will be much simpler and easier to understand than REF.

1 Like

Here in this workflow , we can’t use orchestrator.

Hey,
You can apply the condition like
In for each row activity
If row(“Col C”). Tostring. Equals(“Processed”)
In then condition you can keep continue activity
And in else condition you can keep all actions
Thanks

1 Like

Hi @lakshmi.mp,

You said you can’t use Orchestrator, so can you use a database? Create a table and add a status column, update it as it is processed, and look at this table every time it is processed.

Even if you say we can’t do this, use excel as a table.

You can also use REF without an orchestrator by converting it to datarows.

If you want to continue without REF.

  1. Read Excel
  2. Filter out the unprocessed in column C.
  3. Start with a loop.
  4. At the end of the loop, write “processed” on this line.

Regards,
MY

1 Like

Hi @Rounak_Kumar1 ,

I tried out this method. It is working. Thanks a lot for providing solution…
Thank you all for helping.

Thanks & Regards,
Lakshmi

1 Like

Then after processing each row, write back to the Excel file some value in the last column that you can later use to know it was already processed.

Hi @postwick ,
Thanks for reply. I have column by name Status there it is updating as processed.

Regards,
Lakshmi

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