XLS Password Encryption vs Sheet Protection: What Each One Does
Distinguish confidentiality from edit deterrence, legitimate removal and format limitations.
How the File-Level Password Lock Works in XLS
When Excel or LibreOffice requests a password before displaying any workbook content, the file is encrypted with a password to open. This mechanism scrambles the entire binary stream of the XLS file. The Microsoft Open Specification for the Binary Interchange File Format (BIFF8) documents that encryption uses the RC4 stream cipher. The key is derived from the user-supplied password combined with a 16-byte salt and a verification block. Older implementations default to a 40-bit key; later revisions can use 128-bit keys.
Without the correct password, no component of the file is readable—cell values, formatting, defined names, and metadata all remain opaque. The file is a sealed container.
Observable Checks for File-Level Encryption
- The password dialog appears before any grid, sheet tab, or cell is displayed.
- Opening the file in a hex editor shows the OLE2 compound document signature
D0 CF 11 E0 A1 B1 1A E1, but the internal “Workbook” stream contains no recognizable strings or structures—only random bytes. - File size does not change after a failed open attempt, because no temporary decrypted copy is written to disk.
Legitimate Removal Path and Explicit Limits
There is no legitimate removal method without the password. The only recovery options are brute-force key search or dictionary attack. A 40-bit RC4 key space can be exhausted in hours on consumer hardware; a 128-bit key space is computationally infeasible with current technology. Any service or tool claiming to “unlock” encrypted XLS files is either performing brute-force decryption (which may carry legal risk depending on jurisdiction and file ownership) or producing a false result. If the password is lost, the only clean recovery is restoring from a backup or obtaining the password from the file’s originator. No format converter, hex editor, or repair utility can strip XLS file-level encryption.
What Sheet Protection Actually Restricts
Sheet protection is a flag stored inside the unencrypted workbook stream. It does not prevent reading, copying, printing, or exporting data. It blocks write operations on cells that have their Locked property set to true—which is the default for every cell in a new worksheet.
In the XLS binary format, sheet protection is recorded in the SHEETPROTECTION record (record type 0x01B7). This record contains a boolean flag indicating active protection and an optional 16-bit password hash. The hash is produced by an XOR obfuscation scheme, not a cryptographic hash function. It can be reversed in milliseconds with publicly documented methods.
Observable Checks for Sheet Protection
- The workbook opens without a password prompt. All cell values, formulas, and sheet names are visible.
- Attempting to edit a locked cell produces the message: “The cell or chart you’re trying to change is on a protected sheet.”
- Right-clicking a sheet tab shows “Unprotect Sheet…” in the context menu.
- Opening the file in a hex editor reveals plaintext strings containing cell data, sheet names, and formula tokens. No decryption step is needed.
Hard Limits of Sheet Protection as a Security Measure
Sheet protection in the XLS format is an edit deterrent, not a confidentiality control. The password hash provides no meaningful resistance to removal. Excel itself removes protection instantly when the correct password is supplied via Review > Unprotect Sheet. If the password is unknown, re-saving the file as XLSX and removing protection in a modern spreadsheet application works reliably. Dedicated utilities can strip the SHEETPROTECTION record directly from the binary stream. The underlying data is never at risk of permanent inaccessibility.
How the Two Locks Interact When Both Are Present
A single XLS file can carry both file-level encryption and sheet-level protection simultaneously. These layers are independent. Decrypting the file with the password to open grants access to the workbook contents but does not disable sheet protection. Conversely, knowing the sheet password does not permit opening an encrypted file. If both locks are active, the user must satisfy each barrier separately: first supply the open password, then unprotect the relevant sheet.
What Format Conversion Preserves and What It Discards
Conversion between XLS and other formats handles encryption and sheet protection differently:
- File-level encryption is never preserved across a format change. The conversion process must decrypt the source file to read its contents. The output file is written in plaintext unless the user explicitly applies encryption to the new format after conversion. An encrypted XLS converted to XLSX produces an unencrypted XLSX.
- Sheet protection is preserved when converting XLS to XLSX. Both formats support equivalent cell-locking models. Protection is lost when converting to CSV, TSV, or any plain-text format, because those formats have no concept of cell locking or worksheet structure. Conversion to ODS may preserve the protection flag, but the password hash format differs; the user may need to re-supply the password in the target application.
- Data hidden behind file-level encryption remains inaccessible during conversion. Any converter that cannot decrypt the source file will either fail with an error or produce a corrupted, empty output. No converter can bypass encryption to extract a subset of data.
A Diagnostic Sequence to Identify the Active Lock
- Open the file. If a password prompt blocks access before any workbook content appears, the lock is file-level encryption. If the workbook opens to a visible grid, proceed to step 2.
- Attempt to modify any cell. If the application rejects the edit with a protected-sheet message, sheet protection is active. If edits are accepted, neither lock is present.
- Inspect the binary signature for ambiguous cases. Open the file in a hex editor. An OLE2 header (
D0 CF 11 E0 A1 B1 1A E1) followed by readable ASCII or UTF-16 strings (sheet names like “Sheet1”, cell text) indicates an unencrypted file. If the bytes following the header are high-entropy and contain no readable strings, the file is encrypted. - Examine the internal record structure (optional). Tools that parse XLS binary records can report the presence of a
SHEETPROTECTIONrecord without opening the file in Excel. This confirms sheet protection independently of the application’s UI. Such tools cannot read encrypted files; decryption must occur first.
Technical basis for XLS Password Encryption vs Sheet Protection
Structural claims in this guide are grounded in the primary XLS technical reference.