Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Unlock Excel Workbook Without Password

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can unlock a protected Excel worksheet by modifying the file's internal XML structure to remove the protection tag, provided the file itself is not encrypted with an 'Open' password. This method works specifically for sheet protection (which prevents editing cells) rather than file-level encryption (which prevents opening the file entirely). If you can open the file but cannot edit the data, the following steps will allow you to regain full control of the workbook.

What You'll Need

  • A computer running Windows or macOS.
  • A file compression utility (like 7-Zip, WinRAR, or the built-in macOS Archive Utility).
  • A text editor (such as Notepad on Windows or TextEdit on macOS).
  • A backup copy of your original Excel file (always work on a copy to prevent data loss).
  • Microsoft Excel installed on your computer.

Step-by-Step

  1. Create a Backup Copy: Before attempting any structural changes to a file, locate your Excel workbook in your file explorer. Right-click the file and select 'Copy', then right-click in an empty space and select 'Paste'. This ensures that if a mistake is made during the XML editing process, your original data remains intact.
  2. Change the File Extension: Locate your backup file. If you can see the file extension (e.g., .xlsx), right-click the file and select 'Rename'. Change the extension from .xlsx to .zip. A warning will appear stating that changing the extension might make the file unusable; click 'Yes' to confirm. If you do not see the .xlsx extension, you may need to enable 'File name extensions' in your Windows File Explorer 'View' tab.
  3. Open the ZIP Archive: Once the file is renamed to a .zip format, double-click it to open it as a folder. You will see several folders and files inside. Do not extract all files; you only need to navigate through the internal directory.
  4. Locate the Worksheets Folder: Inside the ZIP folder, find and double-click the folder named xl. Inside the xl folder, you will find a folder named worksheets. Double-click the worksheets folder to view the individual sheet files.
  5. Identify the Protected Sheet: You will see files named sheet1.xml, sheet2.xml, etc. Identify which sheet is protected. If you are unsure, you can open them one by one in your text editor to check the content, but usually, the sheet you are trying to unlock corresponds to the number in the filename.
  6. Extract and Edit the XML: Copy the specific sheetX.xml file from the ZIP folder and paste it onto your desktop. This allows you to edit it without risking the integrity of the ZIP archive itself. Right-click the file on your desktop and select 'Open with' > 'Notepad' (Windows) or 'TextEdit' (macOS).
  7. Find the Protection Tag: Once the XML file is open in your text editor, use the search function (press Ctrl + F on Windows or Cmd + F on Mac) and search for the term sheetProtection. You are looking for a specific tag that starts with <sheetProtection and ends with />. This tag contains all the settings that lock the cells, such as passwords and permissions.
  8. Remove the Tag: Carefully highlight the entire string starting from the opening bracket < of sheetProtection all the way to the closing bracket />. Delete this entire section. Ensure you do not accidentally delete any other brackets or characters that belong to the surrounding XML structure.
  9. Save the Changes: Save the modified XML file in your text editor (File > Save). Close the text editor.
  10. Replace the Original File: Drag the modified sheetX.xml file from your desktop back into the xl/worksheets folder inside the ZIP archive. When your computer asks if you want to 'Replace the file in the destination', select 'Yes'.
  11. Revert the File Extension: Close the ZIP folder window. Go back to your main folder where the .zip file is located. Right-click the file, select 'Rename', and change the extension from .zip back to .xlsx. Confirm the change when prompted.
  12. Open and Verify: Double-click the renamed .xlsx file to open it in Microsoft Excel. The sheet protection should now be gone, allowing you to edit all cells and formatting.

Common Mistakes

One of the most frequent errors is attempting this method on a file that is encrypted with an 'Open' password. If Excel prompts you for a password the moment you try to open the file, the internal XML structure is encrypted, and the steps above will not work. This method is strictly for removing sheet-level or workbook-structure protection where the file is already visible.

Another common mistake is deleting too much or too little of the XML code. If you leave a trailing bracket or fail to delete the entire sheetProtection block, the XML becomes 'malformed'. When you try to reopen the Excel file, you will receive an error message stating that the file is corrupted and cannot be opened. If this happens, do not panic; simply revert to your backup copy and try again, paying closer attention to the exact boundaries of the tag you are deleting.

Users also often forget to enable file extensions in their operating system. If you rename a file and it simply becomes 'Workbook1.zip.xlsx', you haven't actually changed the file type, and the ZIP utility will not be able to read the internal folders. Always ensure the extension is strictly .zip before proceeding.

Tips

Always work on a duplicate file. Even experienced users can accidentally corrupt an XML structure by deleting a single character. Having a 'clean' version of the original file allows you to restart the process immediately without losing your work.

If you are dealing with multiple protected sheets, you must repeat the XML editing process for each individual sheetX.xml file within the xl/worksheets folder. Removing the tag from one sheet will not automatically unlock others.

For users on macOS, if you use the built-in Archive Utility to unzip the file, it may create a folder instead of a ZIP archive. This is fine, but when you are finished editing, you must select all the original folders (xl, _rels, [Content_Types].xml, etc.), right-click, and select 'Compress' to turn them back into a single .zip file before renaming it to .xlsx.

Troubleshooting

The file says it is corrupted and cannot be opened: This almost certainly means the XML code was edited incorrectly. Go back to your backup file, ensure you are only deleting the specific tag from <sheetProtection to />, and make sure you aren't leaving any stray characters behind. Check that you haven't deleted the closing > of a previous tag.

I cannot see the .xlsx or .zip extension: On Windows, open File Explorer, click the 'View' tab at the top, and check the box for 'File name extensions'. On macOS, go to Finder > Settings > Advanced and check 'Show all filename extensions'.

The 'sheetProtection' tag is not appearing in my text editor: This might happen if the sheet is not actually protected, or if the file is not a standard .xlsx file. Check if the file is an older .xls format. If it is an .xls file, you must first open it in Excel and 'Save As' a modern .xlsx file before the XML method will work.

I changed the extension to .zip but it still opens as an Excel file: This occurs when the rename didn't 'stick' or you renamed the wrong file. Ensure you are renaming the file in a folder where you can clearly see the full name, and verify that the icon has changed to a folder or a zipper icon.

Frequently Asked Questions

Can I unlock a password-protected Excel file that requires a password to open?

No, this specific method only works for sheets that are protected against editing. If the file itself is encrypted and requires a password to view the contents, the XML structure is unreadable, and you would need the original password or specialized recovery software.

Will this method delete my data?

If performed correctly, no data is deleted. You are only removing the 'instruction' that tells Excel to lock the cells. However, if you corrupt the XML, the file may become unreadable, which is why using a backup is critical.

Does this work on Excel for Mobile or Web?

No. This method requires access to the file system to change extensions and a text editor to modify the internal code. This is only possible on desktop versions of Windows or macOS.

Is it legal to use this method?

This method is intended for users who have lost access to their own files or are working on files they have permission to edit. Always ensure you have the legal right to access the data within the workbook.

What is the difference between sheet protection and workbook protection?

Sheet protection prevents you from editing cells within a specific tab. Workbook protection prevents you from adding, deleting, or renaming the tabs themselves. To unlock workbook protection, you would need to look for the workbookProtection tag within the xl/workbook.xml file instead of the worksheet files.

Why is my file extension not changing?

This usually happens if your operating system is hiding extensions. You must enable 'File name extensions' in your folder settings to ensure you are actually changing the file type and not just adding '.zip' to the end of the existing name.