Check Write Access Restriction for Excel

Hi, currently having issues with opening excel files as UiPath interaction with the 2 types of protection are different in excel scope. To my knowledge, password protected excel will require the Password field to be populated while the write access restricted excel file will need the Editing Password field to be populated. At the moment, I have no way to know which type of protected excel file I am receiving and so if I open a write access restricted excel file using Password field, it will open the excel file and the password input field will open causing the bot to get stuck at this step as it won’t go to the next activity.
Maybe is there a way to do a check without opening excel to see if a file is password or write access restricted?

Hi @CC_Pet

Please have a look

Thanks

Hi @suraj.setty, trying the code you have shared seems to always return True result even though I have not set any access restrictions.

I tested on a file that requires password to get write access and according to the code, there is no access control when there should be: