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.
Hi
Can you check the excel session hope you are not mix matching them
Hi
Can you check the excel session hope you are not mix matching them
The sessions have been properly matched as intended, in theory the issue should’ve never existed, it has been running successfully before and its still has a chance that it will be (in fact, the bot itself is in deployment). My bot is designed to run in a repeated interval, but every run there is roughly 10% chance the issue wont occur, 90% chance the issue occurs. Luckily, the bot needs to have at least one successful run throughout its schedule but sometimes there will be no successful runs until its schedule ends. The input variables and arguments are exactly the same every run.
I don't have a screenshot of the issue message box itself because it has a custom error handler that sends an email then closes the bot in an event of a system exception. The bot is drumming on a remote machine.
I will instead send you the email of the issue (censoring any confidential info).
Resolution
To resolve this problem, try the following methods, as appropriate, in the given order.
Method 1: Ignore DDE
To correct this setting, follow these steps:
- Select File > Options.
- Select Advanced, scroll down to the General section, and then clear the Ignore other applications that use Dynamic Data Exchange (DDE) check box in the General area.
- SelectOK.
This problem may occur if the Ignore other applications that use Dynamic Data Exchange (DDE) check box in Excel options is selected.
When you double-click an Excel workbook in Windows Explorer, a dynamic data exchange (DDE) message is sent to Excel. This message instructs Excel to open the workbook that you double-clicked.
If you select the "Ignore" option, Excel ignores DDE messages that are sent to it by other programs. Therefore, the DDE message that is sent to Excel by Windows Explorer is ignored, and Excel does not open the workbook that you double-clicked.
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 have had issues when a macro closes Excel itself instead of letting the bot close it. In one case it would give an error stating it was unable to run the macro, when in fact the macro had ran successfully and then the file saved then closed itself. I changed the macro to not close itself when complete and that resolved the issue. Perhaps try letting the bot be the one to close the file instead?
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
Hi
Can you try killing the Excel.exe process after the Excel:Close action and see whether you are getting the error while opening Excel file or not ?
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.