Excel application scope error - workbook closed by 3rd party

Hi all,

I am getting an error within an excel application scope, saying “Copy Sheet: Workbook was closed by a 3rd party, while the Excel Application Scope was running.”

My workflow has a foreach loop that reads different tabs from different excel workbooks and extracts this information into a master workbook, and so far what happens is that it can read the first of the excel workbooks files i want to read, but while transitioning to the second one, i get this error.

Would you be able to help me with this?

Let me know if I can give any more details.

Hi @dcandido
Could you maybe attach your solution? It may be easier to follow your issue.

1 Like

Hi @oriolsolani

Attached my workflow. Main.xaml (34.6 KB)


Hi @dcandido
I’m not sure if it could be related to this: I see that the execute macro activity is being executed inside an Excel Application Scope which is not where the macro is placed… Could this be the issue? You are using an Excel Application Scope for each file inside the specified directory and then running a macro inside… maybe you need to add a different Excel Application Scope for the macro.