Question

8
Replies
1143
Views
Hafizur Rehman Ansari (HafizurRehmanA)
Flextronics Technologies PVT Ltd

Flextronics Technologies PVT Ltd
IN
HafizurRehmanA Member since 2017 1 post
Flextronics Technologies PVT Ltd
Posted: February 20, 2019
Last activity: May 28, 2019
Posted: 20 Feb 2019 23:52 EST
Last activity: 28 May 2019 1:08 EDT
Closed

The application called an interface that was marshalled for a different thread.

Hi Team,

I am facing a frequent exception which gets resolve by restating the BOT. The process step is : "BOT will run & close the excel macro file followed by C# script to kill all opened excel objects and then open another Excel." Logfile say then exception has occurred at excel opening.

Exception:

“Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))."

Please find the attachments and help me to resolve it.

***Moderator Edit-Vidyaranjan: Updated SR details***

***Edited by Moderator Marissa to update platform capability tags' update SR details****

Robotic Process Automation Support Case Exists Support Case Created
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.