I keep getting this exception everytime I open a new workbook (via Excel Advanced: Open).
Even if the previous opened workbooks (via Excel Advanced: Open) had a corresponding close action (via Excel Advanced: Close), so It should not interfere when opening a new one. Each workbook I opened always have the same session name per workbook from Open to Close so it should not be the problem.
The thing is that the previous excel workbooks actually closes itself. Its just that when I open the next workbook it returns an error that I mentioned. Did the bot actually close that previous excel? It should be because I don’t see the previous excel anymore, its properly closed down to its process.
I am running the bot on a remote device so there might be a sync issue with the opening of the excel?
I am quite surprised no one asked about this exception. I might give more details if someone help me with this issue.
An error occurred when closing the workbook. To continue, contact your system administrator.

Best answer by PMosman
On another note, I am also receiving the same error about being unable to close a workbook in a different bot. A small sub task that only opens a workbook, runs a macro, then closes the workbook. I checked my DDE settings and they are as
FYI - I was able to finally solve this error. In my case it appeared to be a possible file lock/sync issue. The excel macro would run then save the file to SharePoint Online after which I would receive the error about closing the workbook when running the Excel:Close action. We changed the macro so that after the file was saved to SP it would then save a backup copy of the file to one of the shared drives. Once this addition was made we stopped receiving that error message.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.