Error: Unable to cast COM object of type ‘System.__ComObject’ to interface type

@jingwang0222

Once give it a try with Workbook Read Range activity and check it once.

Hi Lakshman thanks for the advice, I understand that read workbook can be an option, but my excel app scope cannot work, it didn’t make sense. I would like to find out why this happened, which may also caused by my uipath studio 2019.10, this code works fine before i upgrade.

Thanks

1 Like

@jingwang0222

Could you please downgrade installed excel Package version in Uipath studio and check it once.

Hi Thanks for your reply, the problem got solved by delete the excel part and rewrite again, though I still didnt understand where the error comes from.

Thanks

1 Like

Hi @jingwang0222, I have problem same with you…

Info: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘System.Runtime.InteropServices.ComTypes.IConnectionPointContainer’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{B196B284-BAB4-101A-B69C-00AA00341D07}’ failed due to the following error: The requested object does not exist. (Exception from HRESULT: 0x80010114).

RemoteException wrapping System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘System.Runtime.InteropServices.ComTypes.IConnectionPointContainer’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{B196B284-BAB4-101A-B69C-00AA00341D07}’ failed due to the following error: The requested object does not exist. (Exception from HRESULT: 0x80010114).
at UiPath.Excel.WorkbookApplication…ctor(String workbookPath, String password, Boolean visible, Boolean autoSave, Boolean createNew, String editPassword, Boolean readOnly)
at UiPath.Excel.Activities.ExcelApplicationScope.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Start Time: 12/04/2019 2:00:00 AM
End Time: 12/04/2019 2:01:19 AM
Input Values: null
Output Values: Empty

Can you help me?

As a temporary solution, use the delay activity and type 00:00:01 as the duration. Do this before the excel/excel scope activity.

3 Likes

Hello,

Currently, I am working on 2019.10.2 and facing this same issue.
Recently, the UiPath Studio got an upgrade from 2019.4.2 to 2019.10.2 and this issue came up.
The process is working fine from Ui Path Studio but while running from Orchestrator this error is coming.
Tried solutions are:
1. Added delay before the excel application scope.
2. Rewrite the excel application scope activities.
3. I tried to downgrade the excel package in the Ui path studio.

Nothing is working can anyone help.

Thanks in advance.

4 Likes

Did you solved this issue?I met the same recently

@XZX321,
Hi, Yes issue is resolved.
Actually, when the UI path got upgrade this add-in in MS Excel is got enabled by default. This add-in will be used when you work with Studio X.
When i disabled this add-in in MS Excel the issue got resolved.

Thanks.

2 Likes

HI sorry the solution wasn’t clear, what did you change to get this working ?

Jainsweety’s solution worked for me too.

Open the excel application , click ;

  1. File
  2. Options
  3. Add-ins

Click the drop-down options next to “manage:” and select “COM Add-ins”, then click “GO”

  1. Untick/deselect “UiPath.Intergration.ExcelAddin”, click “OK”, close excel and run the bot again.
12 Likes

@Sandeep_Thattil

Hi Sandeep,

Please follow the below step to disable the add-in in Excel:

.

4 Likes

Hi!
Sorry coming to this Thread. I have same problem. Our client updated to new Office 356 Pro Plus and my processes stopped working.
I have been trying to fix this problem. So which was the working versions of Excel Activities? I tried the newest one 2.7.2. It didn’t fix problem. I do not see any COM Add-ins related to Uipath in MS Excel

Having problem that it success to use the excel applications scope only every second time it runs it. And it only fails in one place. So i get only part of the items through whole process and part of them fails before it get’s even to process them.
It fails to the second excel application scope I have lot of them in this process. It fetches values and then get excels from application and compares them and builds another excel file and reports it (as an excel file) Example:

001 success
002 failed
003 success
004 failed
etc…

Anyone has any tips to this? Client would want it fixed asap. They have Studio 2018.4.2. Enterprise Edition.

1 Like

Hello,

Solution that worked for me:
I faced similar issue. In my case there were back to back excel application scope activities.
I gave delay(5 secs) after first one and then it worked fine.

Hope it helps :slight_smile:

  • Rewriting the Excel application scope activity display name - Resolved this issue.

If multiple Excel application scope activities are used, then give different display name for each scope.

Thanks!

Hy @jingwang0222,

Use the Kill Activity “Excel” prior running the workflow. I have faced issues like this too many times.

If it works please like my post and mark my answer as solution, it helps me :slight_smile:

Regards

it’s really weird from my point of view but I have to say it worked perfectly :slight_smile: Thank you so much .

Thank you … you solve my problem!

This worked for me - thank you so much

Hi
I am facing similar issue, we are using some parallel activities with mouse click triggers in our bot, we are getting intermittent issue as below.

System.Runtime.InteropServices.COMException (0x8004022F): Exception from HRESULT: 0x8004022f
at UiPath.UiNodeMonitorClass.MonitorClick(UiMouseButton mouseBtn, UiKeyModifier keyModifier, UiEventType eventType, String bstrSelector, Boolean matchChildren, UiRegion regionFilter, UiTriggerMode triggerMode)
at UiPath.Core.Monitor.MonitorClick(MouseButton mouseButton, KeyModifier keyModifier, EventType eventType, Selector selector, Boolean matchChildren, TriggerMode triggerMode, Region filterRegion, IPlaceholderResolver resolver)
at UiPath.Core.Activities.ClickTriggerV2.StartSelectorMonitor(NativeActivityContext context, Selector selector, Action1 sendTrigger) at UiPath.Core.Activities.SelectorTriggerActivityV2.StartMonitor(NativeActivityContext context, Action1 sendTrigger)
at UiPath.Core.Activities.MouseAndKeyTriggerActivityBase.StartMonitor(NativeActivityContext context, Action1 sendTrigger) at UiPath.Platform.Triggers.TriggerBase1.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execut