Microsoft Excel · Sharing, output and safety · Intermediate
Password-protect a file and understand protection limits
Encrypt a disposable workbook with a password to open, verify reopening, and distinguish confidentiality from worksheet protection.
Official documentation reviewed; synthetic fixtures checked independently; not executed in Excel · Editorial standards
Quick answer: In Windows desktop Excel, use File > Info > Protect Workbook > Encrypt with Password to require a password to open the file. Worksheet protection and workbook-structure protection solve different problems; they are not substitutes for file encryption.
Choose the right protection boundary
This guide uses English Excel for Microsoft 365 desktop on Windows and a local, user-owned practice file. Do not begin with the only copy of important work. Microsoft cannot recover a forgotten password, and passwords are case-sensitive. Choose your own practice password and keep it privately in an appropriate secure place; do not put it in a worksheet, a screenshot, or a support message.
File encryption restricts opening the workbook. Workbook-structure protection restricts actions such as adding, moving, renaming, or deleting sheets. Worksheet protection prevents changes to selected locked cells and is intended to prevent unwanted editing, not to provide strong confidentiality. Marking a file final is also not the same as encrypting it.
Create a harmless practice file
In a blank workbook, rename the sheet Practice. Enter Item in A1, Amount in B1, Sample in A2, and 100 in B2. Put =B2*2 in B3; it should show 200. Save a local XLSX copy named Protection-practice.xlsx. Keep an unencrypted backup under a different name in your own private folder while learning the workflow.
The example contains no personal or business secrets. This matters because an unencrypted backup remains readable even after a second copy is protected. Encrypting one file does not retroactively protect copies, attachments, exports, or screenshots elsewhere.
Apply a password to open
- Open Protection-practice.xlsx and choose File > Info.
- Select Protect Workbook, then Encrypt with Password. Do not select a sheet or structure restriction and assume it has the same result.
- Enter your chosen password in the password box and select OK.
- Reenter exactly the same password in the confirmation box and select OK.
- Save the workbook. Close it completely before testing; a file already open in memory is not a meaningful password-to-open test.
Reopen that exact file. A password request should appear before the workbook contents become available. In this disposable exercise, try an incorrect entry once: it must not reveal the sheet. Then enter your correct password. Check that B2 remains 100 and B3 remains 200. Encryption should not alter your data or formulas.
Verify a changed workbook
Change B2 to 120 after opening successfully. B3 should become 240. Save, close, and reopen again with the password. Both the protection and changed values should persist. If the workbook opens without a prompt, check whether you reopened the unencrypted backup or left another window of the protected file open.
Keep the protected file clearly distinguished from its backup. If you later want an unprotected working copy, follow your organization’s approved process and verify the resulting copy’s opening behavior before distributing anything. Do not assume that exporting to another format preserves encryption or workbook features.
Understand the remaining risks
Someone who can open the workbook may be able to copy or redistribute its contents. Encryption is not a recipient permission system, and it cannot revoke a copy already shared. Access controls in a managed storage location address a different part of the problem.
If your password is rejected, check case and the exact file name before repeatedly guessing. If the password is lost, stop relying on Microsoft to retrieve it; use your own secure record or an authorized backup. For a formula check after reopening, see basic SUM behavior. This exercise does not require sharing the file, creating an account, or weakening any security settings.