cancel
Showing results for 
Search instead for 
Did you mean: 

unable to open MS Excel work book

PratimaShah1
Level 4
I don't know why these days I am getting below error whenever I try to open an Excel file. 
I have no idea how to fix it. Any help would be appreciated.

13374.png

------------------------------
Pratima Shah
------------------------------
27 REPLIES 27

Is this issue with that particular file or with every file you are trying to open?

------------------------------
Murali Krishna
RPA Consultant
------------------------------

Hi Martin Reuter

Thank you for your reply. 
I removed the Create Instance stage, but that also didn't help  me to fix the error.
I also checked Task Manager and there is no any instance running . 
Also there is no Excel open using any other instance.

With Regards,
Pratima




13335.png

------------------------------
Pratima Shah
------------------------------

With every Excel file I'm trying to open.

With Regards

------------------------------
Pratima Shah
------------------------------

The strange part is that the same sinario is working on another PC,
but not working on the PC that I am using.

With Regards
Pratima

------------------------------
Pratima Shah
------------------------------

hi pratima 

what might help you identify what excel is doing when trying to open the file is after creating an instance add 'Show' action then open workbook. If there are any errors appearing in excel you will see them here.

------------------------------
Michael ONeil
Technical Lead developer
Everis Consultancy
Europe/London
------------------------------

Please open the object/action and copy/paste the code from the code stage in here...

------------------------------
Martin Reuter
------------------------------

Did the exact same thing work previously on your machine and then it suddenly stopped working?

If that's the case, first I'll just say that it sounds about right when dealing with automating any Microsoft Office product (through interop). The fact that it works on another PC (I assume in the same Blue Prism environment), then it likely has to do with the Office installation on your machine. I'd be curious to know if the other machine starts showing the same issues at some point which could mean some Windows update that hadn't yet been pushed to the other machine yet. But for sure the first thing I'd try is uninstalling and reinstalling Office.

------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

Hi Michael ONeil,

I've added the 'Show' action before the 'Open workbook' action, but that also didn't help and I am getting error as shown in the image.

13350.png

With Best Regards
Pratima


------------------------------
Pratima Shah
------------------------------

Hi Dave Morris,

>>Did the exact same thing work previously on your machine and then it suddenly stopped working?

No, It never worked on my PC. 

So should I reinstall Office on my PC to fix this problem.

With Regards
Pratima 


------------------------------
Pratima Shah
------------------------------

Hi Martin Reuter

Thank you for your reply

>> Please open the object/action and copy/paste the code from the code stage in here...

if I'm not wrong, are you talking about this code?

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)


Please also find the images of the code of that action
13356.png

With Best Regards
Pratima


------------------------------
Pratima Shah
------------------------------