Sometimes when I run my workflow I get this error while using excel (Picture attached). It can happen at different moments, at the beginning, in the middle or the end of process.
I know that this is happening because I’m using an Add In that is crashing excel. But I have no choice but to use it. Anyone knows how to go through this?
Not ideal, but a workaround I’ve used is as follows:
Have a parent/main workflow file in flowchart format that invokes the section utilizing excel
Encapsulate the whole portion of the process using excel in a try-catch.
Have a catch for that specific exception type (likely timeout error, correct?)
In the catch, verify that the reason for the error is because excel has stopped working. You could utilize ‘element exists’ or any other activity to do this.
If it occurred due to excel stopped working error, flip an argument flag to ‘true’ and use the ‘kill process’ activity to kill excel
Back in your parent/main flowchart use a flow decision to check the argument flag from step 5. If true, loop back to the invoke workflow to try again. If false, continue workflow as normal. You likely should include a max retry counter in this loop to prevent getting stuck in an infinite loop.
All around it’s not ideal, but it worked for me. Keep in mind that you have to build your workflow in a way that you can get back to the exact moment you killed excel, or reverse any changes you’ve made up to that point to start fresh on your retry