cancel
Showing results for 
Search instead for 
Did you mean: 

How to unlock excel file

KristianHolm1
Level 5

Hi Blueprism sometime a excel file gets locked, and I need to restart the computer to release the locked excel file. When the program running as it should the file is closed correctly with close workbook and close instance. But if the program failed and never get to close workbook and close instance, then you have a locked excel file.

Is there a smart way to unlock the excel file.?
12199.png

------------------------------
Kristian Holm
RPA programmer
PenSam (Pension Company)
Copenhagen Denmark
------------------------------
Kristian Holm RPA programmer PenSam (Pension Company) Copenhagen Denmark
4 REPLIES 4

EmersonF
MVP
Have you tried killing all instance within your error handling block? this should work

------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
Recife
+5581988869544
If my answer helped you? Mark as useful!
------------------------------
Sr Cons at Avanade Brazil

Hi Kristian

There are 2 ways you can handle this issue, firstly you can set your process to attach to the current handle and then exit the current instance of excel which will close the application. Alternatively you can use the VBO Utility - Environment and the Action Read Memory stats in which you can pass in the names of the applications you are searching for to identify if they are open. If there are any instances of excel it will output to a collection and then you can count the rows in the output and if there are any rows you know the application is open and you can use a decision stage here, then use the Utility-Environment and action Kill process to end the application which will allow you to then create your new instance and open your workbook. Example of this is below, hope this helps 🙂

12192.png

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

Hi @Kristian Holm,

As suggested by @Michael ONeil, you can use any of the 2 options. These are the mostly used and appropriate solution for achieving this requirement.​​

------------------------------
Ritansh Jatwani Senior Consultant
Consultant
EY
Gurgaon
*If you find this post helpful mark it as best answer
------------------------------

EVIPUTI
MVP
3 ways i can think of are : 
1- You can also use Blue Prism's Environment Locks to control access to files. So that you can always unlock them from environment locks in system tab.
2- Killing all excel instances should solve this . 
3- Environment utility --> Kill process for excel 


------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------