

In Excel and Word the key length was increased to 40 bits. Hacking software is now readily available to find a 16-bit key and decrypt the password-protected document instantly. In Excel and Word 95 and prior editions a weak protection algorithm is used that converts a password to a 16-bit key. History of Microsoft Encryption password To provide improved security, Microsoft has been consistently enhancing the Office encryption algorithm strength. Due to the encryption of a document protected by a password to open it, a hacker needs to decrypt the document to get access to its contents. If a user fails to enter a correct password to the field which appears after an attempt to open a password-protected document, viewing and editing the document will not be possible. It is possible to set this type of password in all Microsoft Office applications. The password that encrypts a document also restricts the user from opening the document.

The Following code snippets illustrate how to achieve the above options. This can be set with or without requiring a password to open the file. Read - Only Recommended – If the excel file is set as Read-only recommended, then Microsoft Excel displays a message recommending that you open the workbook as read-only when users open the excel file.

To keep others from making structural changes to your documents such as moving, deleting and adding sheets, you can protect the workbook in the following ways. You can protect an anonymous user from viewing, moving, editing or deleting important data from a worksheet or workbook by protecting a worksheet or workbook, with or without a password.
