Forum Discussion
How can I remove password protection from excel file in Windows 11?
You can use Python, but it does not support remove password protection from excel, as it is designed solely to remove password protection from worksheets in .xlsx files built using OpenPyXL.
It allows you to unlock all worksheets at once in a batch, but using this feature requires installing additional Python libraries on your Windows device, and you must run a custom script to fully complete the process of remove password protection from excel.
First, download the software and open the Command Prompt.
Run the installation command:
pip install openpyxl.
Create a blank text file and rename it to unprotect.py, then paste the code into that file:
from openpyxl import load_workbook
wb = load_workbook(‘yourfile.xlsx’)
sheet = wb.active
sheet.protection.password = None
sheet.protection.sheet = False
wb.save(‘unprotected.xlsx’)
Replace the target filename with the name of your protected Excel document. Run the script via CMD. Once completed, the tool will automatically generate a new, unlocked Excel file.
After the script runs successfully, you can open the generated output file. At this point, editing restrictions on all worksheets have been removed.
It cannot be used to remove the workbook-level open password from an Excel file, so it is only suitable for users who simply need to unlock a protected worksheet for editing.
If you don't want to use an online cloud tool or desktop office software, you can try this method. It requires basic programming knowledge, so please think carefully before proceeding.