Scenario: Trying to execute macro in Excel Application Scope and an error appears. If I execute the macro manually it works. I searched in other topics for a solution and I couldn’t find one.
Cadences has thrown an exception
Message: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Microsoft.Office.Interop.Excel._Workbook’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{000208DA-0000-0000-C000-000000000046}’ failed due to the following error: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)).
Source: Execute macro
Exception Type: InvalidCastException
System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Microsoft.Office.Interop.Excel._Workbook’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{000208DA-0000-0000-C000-000000000046}’ failed due to the following error: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)).
at UiPath.Excel.Activities.ExecuteMacro.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Steps to reproduce: In Excel Application Scope use Execute macro and run the flow.
Current Behavior: Exception thrown: InvalidCastException
Expected Behavior: To run macro successfully as before.
Studio/Robot/Orchestrator Version: 2016.6274
Last stable behavior: Worflow execution successfully run the macro.
Last stable version: 2016.6274
OS Version: Windows 7 Enterprise 64-bit
Others if Relevant: (workflow, logs, .net version, service pack, etc):
Noticed that having the “.xlsm” file in another folder location doesn’t bring any errors.