Software & OS

How to Enable Editing in Excel (Protected View, Yellow and Red Bar)

To enable editing in Excel, click Enable Editing on the yellow Protected View bar under the ribbon. If the bar is red, select File, then Edit Anyway, but only if you trust where the file came from.

Protected View is a read-only mode in which most editing functions are disabled. Excel puts a file there for a reason, and the colour of the bar tells you which one. The steps below cover both bars, the cases where neither works, and how to change when Excel uses Protected View at all.

Enable editing from the yellow Protected View bar

  1. Open the workbook. A yellow bar appears under the ribbon, for example with the text "Be careful - files from the Internet can contain viruses."
  2. Check that you know where the file came from.
  3. Select Enable Editing.

The file reloads in normal mode and you can edit, sort, type and save. Microsoft says that after you exit Protected View, the file becomes a trusted document, so Excel should not ask again for that file on that computer.

The same applies to Word and PowerPoint. Microsoft's article covers Microsoft 365, 2024, 2021, 2019 and 2016.

Enable editing from the red Protected View bar

A red bar means Excel found something more serious than "downloaded from the internet". There is no Enable Editing button. Instead:

  1. Select the File tab.
  2. Select Edit Anyway.

Microsoft's wording is that you should do this only if you trust the source and content of the file. A red bar can appear because the file type is blocked, or because the file failed Office File Validation. In the validation case the message reads "Microsoft 365 has detected a problem with this file. Editing it may harm your computer." That is a good moment to ask the sender for a fresh copy, or to open the file only if you can confirm it is genuine.

Why Excel opened the file in Protected View

Microsoft lists these triggers:

TriggerWhat it means
Internet originThe file was downloaded or came from the internet.
Outlook attachmentYour computer policy has marked the sender as unsafe.
Unsafe locationThe file is in a folder treated as unsafe, such as the Temporary Internet Files folder. Administrators can add folders to this list.
File BlockThe file type is blocked. Editing may be disallowed, or allowed but not recommended.
Validation failureThe file failed Office File Validation.
Opened manuallySomeone chose Open in Protected View from the Open menu.
Someone else's OneDriveThe message begins "Be careful - This file is from someone else's OneDrive." Microsoft 365 clients only.

Most of the time it is the first one. A file you saved from a browser or an email carries a Windows marker called Mark of the Web, and Office treats it as untrusted until you say otherwise.

If Enable Editing does nothing or is missing

Work through these in order.

  • Your organization manages Excel. Microsoft states that your administrator may have rules preventing you from exiting Protected View. Policy settings for this apply to Microsoft 365 products. There is nothing to fix on your side, so ask IT.
  • The bar says "Security Risk" and is about macros. This is a different warning. On Windows, Office blocks macros in files from the internet, and that banner has a Learn More button instead of Enable Content. Follow how to turn on macros in Excel.
  • The file is still marked as from the internet. Close it, right-click it in File Explorer, choose Properties, tick Unblock on the General tab and select OK. Microsoft documents this as the way to remove Mark of the Web from a local copy. Because Protected View lists internet origin as a trigger, this is the logical fix if Excel keeps reopening a file you trust in Protected View, though Microsoft's page on that step is written about macros.
  • Screen reader users. Microsoft notes that editing is locked in Protected View, and suggests pressing F7 to turn on caret browsing to move through the text.

Unblock a file with PowerShell

The Unblock-File cmdlet does the same as the checkbox. Microsoft describes it as removing the ZoneId value from the file:

Unblock-File -Path "C:\work\budget.xlsx"

Replace the path with your file, then open it again. To check a file's zone first, run this at a command prompt:

notepad budget.xlsx:Zone.Identifier

Notepad shows a ZoneId under [ZoneTransfer]. Microsoft's mapping is 0 for My Computer, 1 for Local intranet, 2 for Trusted sites, 3 for Internet and 4 for Restricted sites. Mark of the Web is added by default only for files from the Internet or Restricted sites zones. It also only applies to files on an NTFS file system, not FAT32 devices.

Stop Excel from using Protected View for a folder

If you routinely open files from one folder that you control, a Trusted Location avoids the prompt each time:

  1. Go to File, then Options, then Trust Center.
  2. Select Trust Center Settings, then Trusted Locations.
  3. Select Add new location.
  4. Select Browse, choose the folder, and select OK until the windows close.

Microsoft warns that files stored in a trusted location are considered safe and bypass some security checks, so only add folders whose contents you trust. Choose a folder only you can write to. Microsoft recommends against making network locations trusted.

Change Protected View settings in the Trust Center

Check with your administrator first. Then go to File, then Options, then Trust Center, then Trust Center Settings, then Protected View. These are the options, using Microsoft's wording:

  • Enable Protected View for files originating from the Internet
  • Enable Protected View for files that are located in potentially unsafe locations
  • Enable Protected View for Outlook attachments
  • Always open untrusted Text-Based files (.csv, .dif and .sylk) in protected view (Excel only)
  • Always open untrusted Database files (.dbf) in protected view (Excel only)

Unticking the first three removes the safety net for every file of that kind, not just the one in front of you. For one trusted file, Enable Editing, Unblock or a Trusted Location is a smaller change. The two Excel-only options are the reason a downloaded .csv can open read-only even when other downloads do not.

Make a trusted file open in Protected View again

Because exiting Protected View marks the file as a trusted document, you may later want to undo that. Microsoft points to its "Trusted documents" guidance for revoking trust, after which those files open in Protected View again. To test the behaviour on a single file, use File, then Open, select the arrow next to Open, and choose Open in Protected View.

What does and does not work in Protected View

Protected View is read-only, and Microsoft says most editing functions are disabled. It adds two caveats: add-ins may run in Protected View but may not work correctly, in which case the add-in's author may have an updated version, and cloud fonts do not download until you enable editing. If a workbook looks wrong in Protected View, that is not proof the file is damaged. Enable editing only after the trust check above, then look again.

Frequently asked questions

Why is Excel read-only and the Enable Editing button greyed out or missing?
Your administrator may have set rules that prevent you from leaving Protected View. Microsoft says that if you can't exit Protected View, an administrator's policy is the likely cause. Ask your IT team, or save the file to a location your organization treats as trusted.
Is it safe to click Enable Editing?
Only if you trust the source and content of the file. Protected View exists because files from the internet, email attachments and other unsafe locations can contain viruses. If you only need to read the file, you can leave it in Protected View.
Will Excel ask me again next time I open the same file?
Usually not. Microsoft says that after you exit Protected View, the file becomes a trusted document. Files you never trusted still open in Protected View.
How do I make Excel open a file in Protected View again?
Open File, then Options, then Trust Center, then Trust Center Settings, and use the guidance for revoking trusted documents. You can also open a file on demand in Protected View with File, then Open, then the arrow next to Open, then Open in Protected View.
Does Enable Editing also turn on macros?
Not necessarily. Protected View and macro blocking are separate checks. A file from the internet that contains macros can show a red Security Risk banner with no Enable Content button, and that needs the Unblock step instead.

Sources