Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Unlocking a Worksheet with an Unknown Password.

Unlocking a Worksheet with an Unknown Password

by Allen Wyatt
(last updated March 25, 2017)

9

Dennis has a travel expense worksheet that he has inherited; it has been passed down within his organization for years. Some of the cells in the worksheet need to be unlocked so that Dennis can correct the outdated formulas they contain. There is the problem, though: The worksheet is locked, and changing the formulas is not permitted because of the protection. Dennis wants to know how he can unprotect the worksheet so he can make the necessary changes.

Depending on the way that the worksheet was protected, you may be able to simply copy the worksheet contents to a new worksheet. Follow these steps:

  1. Create a new, blank worksheet. This can be in the current workbook or in a new workbook.
  2. Display the original worksheet that is protected. The first cell in the worksheet (A1) should be selected.
  3. Press Shift+Ctrl+End. Excel should select all the used cells in the worksheet. (If it doesn't, hold down the Shift key and press the arrow keys until you have selected all the worksheet cells.)
  4. Press Ctrl+C. This copies the selected cells to the Clipboard.
  5. Display the new, blank worksheet you created in step 1. Cell A1 should be selected.
  6. Press Ctrl+V. Excel pastes the contents of the Clipboard to the new worksheet.

The new worksheet can be changed in any way you need. If the old worksheet has links to other worksheets, you may need to copy those separately or establish those links manually. You will also need to adjust row heights and column widths, as necessary, to match the old worksheet.

If your worksheet is saved in the XLSX or XLSM formats, there is something else you might try. These formats are nothing but XML code within a ZIP container, with the filename extension changed to either XLSX or XLSM. This means you can follow these general steps, all within Windows:

  1. Make a copy of the workbook. (You always should do your tinkering on a copy, not the original.)
  2. Change the workbook's filename extension to ZIP. For instance, if the workbook started as MyWorkbookCopy.xlsx, change it to MyWorkbookCopy.zip.
  3. Double-click the renamed workbook file. It should open up as a compressed folder just fine.
  4. Find the file in the folder named sheetXXX.xml that corresponds to the worksheet you want to unprotect, where XXX is a number representing the "sheet number" of the worksheet within the workbook.
  5. Open the xheetXXX.xml file in a text editor, such as Notepad.
  6. Search for <sheetProtection> (including the angle brackets).
  7. Delete the entire sheetProtection tag. This means that you delete everything between and including <sheetProtection> and </sheetProtection>.
  8. Save the file.
  9. Change the workbook's filename extension from .zip to .xlsx or .xlsm, depending on what it originally was.

At this point, you should be able to open the workbook in Excel and you'll find that the worksheet is no longer protected.

If the above ideas don't work, for some reason, you will need to actually try to crack the worksheet password. There are macros available, on the Internet, that will remove or identify any internal passwords, such as those used to protect a worksheet. If you do a search for "Excel password cracker" or something similar, you will find lots of candidates. The problem is that you'll also get lots of search results for programs that remove workbook passwords—something you don't need for this particular purpose.

Let me save you some trouble, however. There is a perfectly good internal password remover that is available at this page:

http://www.mcgimpsey.com/excel/removepwords.html

The page explains the macro (which is rather long) and even provides a download you can use, if desired.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12199) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Unlocking a Worksheet with an Unknown Password.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Backing Up Label Layouts

Once you create a custom label layout it is a good idea to backup the layout on a different hard drive in the event of a ...

Discover More

AutoFilling from a Custom List

AutoFill can be a real timesaver if you often work with set lists of data. You can define your own custom lists and then use ...

Discover More

Automatically Copying Formatting

It's easy to automatically set the contents of one cell to be equal to another cell. But what if you want to copy the ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Preventing Someone from Recreating a Protected Worksheet

When you share a protected workbook with other people, you may not want them to get around the protection by creating a new ...

Discover More

Visually Showing a Protection Status

Need to know if a worksheet or workbook is currently protected? Excel provides some tell-tale signs, but here are some ways ...

Discover More

Locking Worksheet Names

Want to stop other people from changing the names of your worksheets? You can provide the desired safeguard by using the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven minus 2?

2017-04-05 20:05:34

Hasnat

This is awesome. Zip\opening worksheet by notepad\find and delete protection string works just like chime for xlsx file. Thanks for the tips.


2017-04-05 16:31:40

Laurel Brown

2.Change the workbook's filename extension to ZIP.
3.Double-click the renamed workbook file. It should open up as a compressed folder just fine.
This only seems to work on files without password protection.
The password protected renamed file doesn't open at all, giving this error message:
"Windows cannot open the folder.
The Compressed (zipped) Folder 'C:/...' is invalid."


2017-03-30 16:16:54

Kenneth

re: "You will also need to adjust row heights and column widths, as necessary, to match the old worksheet."
Would not Paste-Special-Column Widths work for matching the column widths to the old worksheet ?


2017-03-27 10:03:32

Viwap

Good tip, but some worksheets are protected in a way that selecting A1 is not possible. I found the following trick somewhere on the Internet; it worked well for me: type the range in the name box (I prefer A1:XFD1048576 in an .xlsx document in case there are hidden rows/columns--adjust for older formats) and press Control+C; then, press Control+V on a blank .xlsx document. You should have all the functionality less the password protection.


2017-03-27 09:31:11

Bill

Opening the xml extension file in Notepad adds a carriage return to every line. When you then save the file and try to open in Excel, it reads as a corrupt sheet and there is no data. So, if someone could tell me what I did wrong, that would be appreciated.


2017-03-27 08:38:13

JC

@Richard Price, I assumed that by "Depending on the way that the worksheet was protected...", the author was referring to the option of allowing/disallowing protected cells to be selected when protecting a worksheet.


2017-03-27 05:27:26

Richard Price

The article says "Depending on the way that the worksheet was protected...", and it does seem that some are not susceptible to the exact above methods. I have a workbook originally created as an .xls (probably in Excel 2003) but since Saved As an .xlsx. One sheet is unprotected and one is protected, including locked cells, with just a few unlocked for data entry. I know the password, but I tried the above steps out of curiosity.

Selecting cells doesn't work at all, so I cannot copy them to a new worksheet. The ZIP file route does work up to a point - the xml file for the protected sheet includes the formulas for locked cells in plain text, so this is a good demonstration of how 'protecting' a worksheet is in no sense like encrypting the file. However, the xml file does not contain simple <sheetProtection>... </sheetProtection> tags; what it has instead is this (with some details replaced by asterisks):

<sheetProtection algorithmName="SHA-512" hashValue="**************************************************************************************==" saltValue="**********************==" spinCount="100000" sheet="1" objects="1" scenarios="1" selectLockedCells="1"/>

Perhaps unsurprisingly, deleting the whole of this tag then trying to open the file in Excel 2016 produces the message "We found a problem with some content in [this file]. Do you want us to try and recover as much as we can?". Saying 'Yes' to this does appear to recover the worksheet, unlocked.


2017-03-25 10:16:18

Don E

Some time ago, I was attempting to verify that Google Sheets retained worksheet protection. I was contemplating allowing wide access to an Excel Workbook, and wanted to be certain that the cells with formulae would be protected. Bottom line, they weren't. Uploading an Excel file to Google Sheets removed password protection.


2017-03-25 05:19:51

Radhe

Dear Sir,


Please suggest for break Encrypt Password in excel. need your help.

please send me code.


Thanks
Radhe


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.