Excel Macro - timeOut Exceptions waiting for Macro to complete

I am trying to create a process that runs an excel macro which pulls back a large amount of data. I am able to get the process kicked off with UIPath, but the original macro creates the data and saves it to the desktop as an xlsx. When the macro finishes it sends back a popup to the screen stating the process is complete. This can take anywhere from 5-10 mins or more to gather all the data. I then need to take the xlsx file, format it with headers/footers/page numbers and mail it as a pdf file.

Once the process gets going I fail on timeOut exceptions.I was trying to do this in a state machine with transitions trying to use a Find Element or On Element Appear. I have also tried just putting it in a flowchart, but I got the same results. I guess I can try and create a huge delay in the process, but would like to use the tool to its best ability. Can anyone provide me some guidance in trying to set this up the right way?


I am new to RPA UiPath, but seeing your scenario - I would have the while/do while to have the Delay activity and Element Exists to check the Excel available for processing.

till It finds I will have criteria to false, Please let me know if that works. Thanks~Rajesh

1 Like

Hi, I’m having the opposite problem as above.

I’m currently trying to execute a printing macro within an excel scope, inside a parallel.
If the macro takes longer than expected, I want to forcefully throw an error so that the flow can continue.
I’ve inserted a 1min wait into the Macro to test the scenario, and the Delay on the right side in the parallel is set to 10 sec. After 10 sec the flow goes on to execute the Throw, the problem is that it stops there and waits for the macro to finish the execution. If it’s only the 1min it as to wait for, it’s fine, but if en unexpected error occurs that makes the Macro stop, then the whole flow will stop, which is what I want to prevent.

Is this waiting function a default in Execute Macro or is there some way to fix this?

CompleteCondition in Parallel is set to True. ContinueOnError in Execute Macro is blank (Default False).

Thank you.