Question

8
Replies
695
Views
HafizurRehmanA Member since 2017 1 post
Flextronics Technologies PVT Ltd
Posted: 1 year ago
Last activity: 1 year 4 months ago
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 SR Exists SR Created
Moderation Team has archived post
Share this page LinkedIn