Excel error handling

Hey!

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?
Capture

Hi
Is this repeating even when done manually
Like once after opening the file

Use STARR PROCESS activity and pass the file path of excel as input to FileName property, if we want to access the excel file from front end UI

OR

To run in background use EXCEL APPLICATION SCOPE

Cheers @jadbenn

Not ideal, but a workaround I’ve used is as follows:

  1. Have a parent/main workflow file in flowchart format that invokes the section utilizing excel
  2. Encapsulate the whole portion of the process using excel in a try-catch.
  3. Have a catch for that specific exception type (likely timeout error, correct?)
  4. 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.
  5. If it occurred due to excel stopped working error, flip an argument flag to ‘true’ and use the ‘kill process’ activity to kill excel
  6. 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