How to resolve 'Copy Sheet' error in excel?


I’ve encountered below error message while copy the sheet to current excel file.
How can I solve it…?

I’d like to copy ‘RPA_Template’ sheet to ‘MMdd’ name sheet

Thank you!

@Dorothy_lee - could you please show us what you have in “DestinationSheetName” ?

@prasath17 Hello~ Please refer to below

I’d like to create ‘0446’ sheet :slight_smile:

@Dorothy_lee - I guess 0426 right?

So 0426 sheet name does not exist…and you would like to copy RPA_Template to 0426 right??

You can use write range also…have you tried??


Which excel version do you use?

If 2013 or 2010, it doesn’t work due to its specification.


Oh sorry. haha I mistype.yes It’s 0426
Yes, you understood correctly.
Than can it be possible to write the sheet name?

@Dorothy_lee - Yes possible. But could you please brief your requirement?

Here is what I have tried…

My Output

I see that your process is working properly Humm…
My process is exactly same as yours.

  1. When robot is running
  2. Copy ‘RPA Template’ sheet
  3. and create copied sheet with name of Now.ToString(“MMdd”) at str_CurrentReport (excel file)

@Dorothy_lee - So issue resolved now?

I can see only difference between yours and mine is, the destination path…in your initial screenshot I can see you have provided the path which I didn’t because in my case I am copying to current scope workbook.

@prasath17 Not yet haha. I’ll try to find below error case in uipath
Yep, I found the difference that you mentioned as well, So tried with without path value but faced same error. I don’t know why and this is Office 2016 and xlsm file format.
“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”: “09:45:24”,
“processVersion”: “”,
“jobId”: “ddd41864-5c67-4cf2-83a0-35bd81049b26”,

Thank you so much for helps :grin:

@prasath17 Based on below comment from other inquiry. Copy sheet can not be performed at one excel file.
How did you handle it? did you use same file or utilize from other excel file’s sheet?

@Dorothy_lee - I tried with xlsm file too , works fine.

Copy (30.2 KB)

Run this attached xaml as is, you will see the new sheet created.

Try and let me know…

1 Like

Oh… I found that seems like my Uipath is problem
Faced below same error!

@Dorothy_lee - Did you tried mine?? On my end…everything is working…I am able to copy to the same sheet…

1 Like

Yes, I’ve tried with yours and failed.
So, I just changed the way of copy the sheet as below. and it work…I’m not sure which cause the error code but probably my uipath path version or excel config issue. By the way, thank you for helps~!!

1 Like