cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR: Exception : Failed to copy worksheet: Requested Clipboard operation did not succeed

ERROR: Exception : Failed to copy worksheet: Requested Clipboard operation did not succeed.

Hi Mates, I am facing above issue while using copy&Paste range action from Excel VBO. This is not always giving an exception but somewhere in and around 5K rows, 1 or 2 rows getting failed to paste over destination worksheet. Did someone ever face this or do you have any solution to handle this error.

Thanks in advance 



------------------------------
Haritha Chekuri
------------------------------
8 REPLIES 8

steven.boggs
Staff
Staff

Hi Haritha,

Our documentation on this error provides the following guidance:

"

When running a Process that utilises the MS Excel VBO with a large worksheet, the initial launch of Excel consumes a large percentage of CPU. This can cause Resource machines with a relatively low processing capability to quickly reach a maximum, and may also result in the following error being returned:

"An unhandled exception occurred in Blue Prism:

 System.Runtime.InteropServices.ExternalException (0x800401D0): Requested Clipboard operation did not succeed."

This is a Microsoft exception that is passed through to Blue Prism. Microsoft have acknowledged this issue but have not yet issued a fix.  However, a common workaround is to disable hardware graphics acceleration within Excel. This will not resolve the issue but it can alleviate the symptoms.

To disable hardware graphics acceleration within Excel:

  1. Click File > Options.
  2. Go to the Advanced tab.
  3. Under the Display section, check the box for 'Disable hardware graphics acceleration'.
  4. Click OK and restart Excel.

Note: This option might not be present in some versions of Excel or 32 bit versions.

For more information, please see this Microsoft Answers article, "Can you suggest PC specifications for working with large Excel files?", which provides further advice on recommended machine specifications for addressing this type of issue.



------------------------------
Steve Boggs
Senior Product Support Engineer
Blue Prism
Austin, TX
------------------------------

Hi @HarithaChekuri97

I think Steve has already provided the most suitable solution for this but if you dont have the option to change the settings in the machine then an alternative may be to simply chunk up the data you are moving. E.g. copy and paste rows 1 - 2500 then do the same for rows 2501 - 5000. 



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

Denis__Dennehy
Level 15

I'd also add that for very large spreadsheets with large amounts of data I often used the OLEDB interface to interface with it rather than the Excel VBO.  You can treat an Excel database just like a database if you are confident in SQL.  
Check out this: Using OLEDB for interacting with a large excel | Blue Prism Product

Thanks Steve, I will definitely try this and let you know if this helps me. Actually this isn't happening to all the rows or all the time. So let me try this settings and find if this is helping me



------------------------------
Haritha Chekuri
------------------------------

Hi Denis,

The one I'm using is a password protected spreadsheet, so I cannot use oldeb or I don't know how we can open a password protected spreadsheet with oldeb. If you have any suggestions please let me know 



------------------------------
Haritha Chekuri
------------------------------

Hi @HarithaChekuri97

Unfortunately there isnt any out the box solution for opening password protected files using OLEDB. I think to do this you would need to create a new coded action to use Interop to open a password protected workbook.



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

Is there a reason the Password needs to remain encrypted?  Excel passwords are not very secure and for a Blue Prism solution the security can be moved instead to ensuring the file is in a secure location and ensuring the secure location access is pinned down and audited.  Part of the design of an RPA solution often involves changing existing processes and getting it signed off by infosec.

If you are getting memory/performance issues in excel and cannot use a different interface then the answer is usually to break down what you are doing into smaller chunks of data - so interface with the excel document in smaller ranges.

priyaleon
Level 2

Facing occasional errors like "Failed to copy worksheet" in Excel VBO during large operations is not uncommon. Try breaking down the task into smaller chunks or explore alternative methods like using CSV files for large data transfers. This may enhance stability and circumvent issues with extensive clipboard operations.



------------------------------
priya leon
------------------------------