Issues with excel macro with 5.7.3

Hi all,

We have a process that runs excel macro in an xlsm file, and send an email when finished. We managed to have it working fine with version 5.7.0, but since 5.7.3, we receive the following execution error :

#Microsoft Excel cannot access the file "...\Macros.xlsm". Several reasons are possible:
• The file name or path does not exist.
• This file is currently being used by another program.
• The workbook you are trying to save has the same name as a workbook that is currently open.

Location: action "Halt/warn on condition", module "Main", table "Table1"

However the file exists, resides on the same disk as EM server, is not used by another program and is not currently open (nothing to see in the task manager).

Is this something that can be fixed ?

Thanks and best regards,
Chris

Hi Chris,

There were no changes in the "Excel command" action between versions 5.7.0 and 5.7.3.

Maybe something was changed on your end, like the Excel version, the code of the executed macro, or some file or folder permissions?

Is it possible for you to share the project in question with us? If so - please send it to support@easymorph.com

Hi Chris,

Thank you for sending the files. Unfortunately, I haven't been able to run the project since I don't have access to the source Excel file and the database.

Does the Macro.xlsm file is synchronized with a cloud service like OneDrive, Google Drive or Dropbox?

If not, please try to add a delay of 30 seconds to the very end of your macro.

If that won't help, please try to replace the "Excel command" action with the "PowerShell" action that executes a script that runs the macro but doesn't save the target file afterward. Here is an example of the script:

$param1 = "{EM_Param1}"
$excel = new-object -comobject excel.application
$workbook = $excel.workbooks.open("some\path\Marco.xlsm")
$excel.Run("MyMacro", $param1)
$workbook.close($False)
$excel.quit()