Question

An error occurred when closing the workbook. To continue, contact your system administrator.

  • 24 January 2023
  • 5 replies
  • 47 views

Badge +1

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.


5 replies

Userlevel 4
Badge +7

@BravoSix  can you provide screenshot of the issue

Userlevel 5
Badge +8

Hi @BravoSix 

Can you check the excel session hope you are not mix matching them

Badge +1

Hi @BravoSix 

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.

Badge +1

@BravoSix  can you provide screenshot of the issue

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).

Userlevel 4
Badge +7

@BravoSix 

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:

  1. Select File > Options.
  2. 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.
  3. 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.

Reply