cancel
Showing results for 
Search instead for 
Did you mean: 

Open excel was rejected

EricLi
Level 6

Robot open an excel was rejected. System provide message: Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))

After check, it is because one of the worksheets include a pivot table. If delete this worksheet, robot works. But that is not I want; How can I open this kind of excel.



------------------------------
Eric Li
Operation Analysis
AIG
Asia/Hong_Kong
------------------------------
4 REPLIES 4

SteveBoggs
Staff
Staff

Hi Eric,

Unfortunately, the 'RPC_E_CALL_REJECTED' error is generated by Excel and passed through to Blue Prism, so there's not really much from a Blue Prism Product perspective we could recommend to resolve this. This Knowledge Base article contains some external links for troubleshooting which may help with this though.



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

harish.m
Level 12

Hi Eric,

Check below threads  and verify whether it will help you to resolve the issue.

https://support.microsoft.com/en-us/topic/you-receive-an-error-message-or-the-program-stops-responding-in-accounting-professional-or-in-accounting-express-fbfad9f7-d574-598d-54c6-5beef60f0984

https://learn.microsoft.com/en-us/previous-versions/troubleshoot/winautomation/support-tips/excel-automation/failed-to-write-into-excel-call-was-rejected-by-callee



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
----------------------- If I answered your query. Please mark it as the "Best Answer" [FirstName] [LastName] [Designation] [JobTitle] [City] [State] [Phone]

LeonardoSQueiroz
Level 10

Hello Eric, 

Try including a wait stage before the action you are using, when i am get this error it helped me.

Regards,



------------------------------
Leonardo Soares
RPA Developer Tech Leader
Bridge Consulting
América/Brazil
------------------------------

Leonardo Soares RPA Developer América/Brazil

Hey guys, we are having currently BP version 6.10.5 and having the same problem when using "Open Workbook" action after creating an instance for Excel file. Either we get Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED) or sometimes even The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) and we have solved it by removing Activate() action from the code that is behind the Open Workbook code stage: 

29606.png

So, actually remove activation of the Excel window from the code stage and it works perfectly for us WITHOUT sleeps and retries as were suggested above:

Example 1:

name = ExecWithTimeout(Timeout, "Open Workbook",
Function()
    Dim instance = GetInstance(handle)
    Dim workbooks As object = GetProperty(instance, "Workbooks")
    Dim wb As Object = Invoke(workbooks, "Open", filename)
    Invoke(wb, "Activate")
    Return wb.Name
End Function)

Example 2:

Dim app as Object = GetInstance(handle)
app.DisplayAlerts = False
Dim wb as Object = app.Workbooks.Open(filename)
name = wb.Name
wb.Activate()

Hope it helps 😉



------------------------------
Anastasiya Ilgova
Lead Automation Developer
Automation COE
Europe/Prague
------------------------------