Excel Locking and Unlocking

How to lock an excel with password and unlock the excel to read\write data.

Detailed Explanation:
Excel contains sensitive data that needs to be encrypted or password protected , so how can we lock the excel in uipath and how to read data from locked excel.


In principal you have a password option in Excel application scope that can help you work with password protected Excels. If you don’t want the Excel to be showing while the robot is working you can use the File Access Activities (those under System->File->Workbook) or Uncheck the visible property

If you want to enable protection on a Excel during the process I think the simplest way is to create a VBA Macro that locks the Excel. For that you can check out this link Password Protect an Excel Macro - Easy VBA Tutorial.

If you want to give the password dynamically you can write inside a cell in Excel from UiPath Studio, use the Macro and then delete it.

Hope this helped let me know if your having issues.

1 Like

Hi @amkmukesh788

It has an activity called “Set Password” . Using this activity,Can able to lock and unlock the excel file by password.


How can we ensure that excelfile is not locked by robot when done? I use a “Move file” in SharePoint when robot is done with the job the file is locked by robot…

Great, that’s exactly what happened to me.The answer you said just can provide me with help, thank you very much