ExcelProcessMode bug on "Only If exists"?

I was trying to attach to the existing/open Excel file/process, so I set ProcessMode to “Only if exists” on the Excel Process Scope, with a Use Excel File activity inside.

This threw an ExcelException on the Use Excel File. After playing around with the filepath and various properties on each activity (changing one thing at a time to isolate the problem), I found the thing that made it finally work was changing ProcessMode to “Reuse if exists”.

This is probably “good enough” for my current purpose but seems like a bug?

The documentation suggests there’s some difference, dependent on the file conflict resolution property:

  • Reuse if exists - Searches for any open Excel processes when the first Use Excel File activity is executed to verify if a file is already open. If an open file is found, that process is associated with Excel Process Scope. In the event that another open file is found, the File conflict resolution setting is applied.
  • Only if exists - Searches for any open Excel processes when the first Use Excel File activity is executed to verify if a file is already open. If an open file is found, that process is associated with Excel Process Scope. If no open files are found, an exception is thrown.

It’s unclear what the difference is between “an open file” and “another open file”. To clarify: I only have one instance of Excel running, and it is open with the file in question.

Hey @Legoman ,

Thank you for reaching out regarding this question, Only if exists would search for any open Excel processes when the first Use Excel File activity is executed to verify if an Excel process aleady exists. If an existing process is found, the Excel file we’re trying to run and its process is associated with that. If no open files are found, an exception is thrown.
I’ve shared a link to our documentation as well:

You linked to the same documentation I quoted directly in my OP…

I guess it’s confirmed a bug. Don’t know if it’s fixed yet and I don’t really care anymore anyway, given this was like eight months ago now.

Thanks I guess for trying.

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