Skip to content
Setup FoundrySetup Foundry

Documentation

Set document behavior if file validation fails

This user policy controls how Excel 2016 and other Excel releases in the Office 16.0 product family handle workbooks that fail Office File Validation.

since 0.9.8.11

Purpose

Show registry keys (2)
  • HKCU\software\policies\microsoft\office\16.0\excel\security\filevalidation\openinprotectedview
  • HKCU\software\policies\microsoft\office\16.0\excel\security\filevalidation\disableeditfrompv

This user policy controls how Excel 2016 and other Excel releases in the Office 16.0 product family handle workbooks that fail Office File Validation. File Validation examines the structure of supported files for irregularities that might indicate corrupted or potentially harmful content.

The two REG_DWORD values jointly select the resulting behavior:

  • openinprotectedview=0: Excel blocks the file completely. It cannot be opened for viewing or editing.
  • openinprotectedview=1 and disableeditfrompv=1: Excel opens the file in Protected View and prevents the user from enabling editing.
  • openinprotectedview=1 and disableeditfrompv=0: Excel opens the file in Protected View but permits the user to enable editing.

While a workbook remains in Protected View, its contents can be viewed but not edited. Active content such as VBA macros and data connections is also restricted.

Notes

Security

Protected View reduces the risk that a specially crafted or structurally invalid file will immediately execute harmful code when opened. A validation failure does not, by itself, prove that a file contains malware.

Allowing editing lets the user leave Protected View. Removing that containment can allow active or specially crafted content to use additional Excel functionality under the security context of the signed-in user. Other Office security policies continue to apply.

Blocking the file completely also prevents it from being displayed and therefore provides stronger containment than Protected View from which editing can be enabled.

Possible side effects

Corrupted, incorrectly generated, or nonconforming legitimate workbooks can also fail File Validation. Depending on the selected behavior, users might be unable to open such files or might only be able to view them without editing. This can interfere with normal processing or recovery of legitimate data.

Notes

This setting controls only what happens after File Validation fails. It does not enable or disable Office File Validation itself, nor does it determine which file types are validated.

Because this is a user policy stored under HKCU, its behavior applies to the individual user. The values must be considered together; disableeditfrompv is relevant only when the file is opened in Protected View.

Microsoft documentation

Microsoft Support: What is Protected View?

Microsoft Learn: Application.FileValidation property (Excel)

Microsoft Learn: ProtectedViewWindow object (Excel)

See also