Exception: 0x8001010E when copy paste sheet in excel

Hi

I need to copy paste one template sheet to another new sheet in the same excel, for example as this screenshot:

I want to copy sheet “Example” to a new sheet named “Result” in the excel “Example.xlsx”
But error said

{
“message”: “Copy Sheet : 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: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).”,
“level”: “Error”,
“logType”: “Default”,
“timeStamp”: “14:13:38”,
“processVersion”: “1.0.6942.25427”,
“fileName”: “Copy Sheet”,
“jobId”: “c8ea83bd-de17-4c58-afe2-bb5f29fb549d”,
“robotName”: “WJ4RD52S”
}

Help! Thanks!

1 Like

New folder.zip (10.3 KB)

image

If I dont write the destination file path as the blue circle, it will show error like this:

{
“message”: “Copy Sheet : 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: The requested object does not exist. (Exception from HRESULT: 0x80010114).”,
“level”: “Error”,
“logType”: “Default”,
“timeStamp”: “14:18:42”,
“processVersion”: “1.0.6942.25427”,
“fileName”: “Copy Sheet”,
“jobId”: “d3660b3d-8754-4d28-b948-60a713ab26b6”,
“robotName”: “WJ4RD52S”
}

if I write the file path, the error will be my first post, any idea?

Which version of excel you are using.? as per definition

Important!

The Excel Copy Sheet activity does not function properly with Office 2010 and 2013 versions.

Try with balareva’s Copy sheet activity.

1 Like

hi divyashreem, thanks for your advice

I am using excel 2016, and balareva dont have copy sheet, but I do find there are “copy to workbook” and “copy to file”, they dont work, copy to workbook has no error and do not work; copy to file keep has error…
Can you try the file I uploaded? Thanks again!

The error caused by that: the copy sheet activity can only copy sheet from one excel file to another, and cannot copy and paste sheet inside one excel file.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.