Fix Excel Group Policy Errors When Opening Macro-Enabled XLSM Files
Question details
Users need to resolve an Excel file format or file extension error that appears when opening macro-enabled .xlsm workbooks after security-related Group Policy settings are applied.

- Product
- Microsoft Excel and Windows Group Policy
- Device & OS
- not provided
- Scenario
- An organization deploys security policies to Windows devices and users need to continue opening approved macro-enabled Excel files.
- Observed behavior
- Excel displays a file format or extension error for .xlsm files after the policies are applied; the issue stops when the policies are reverted.
Identify one affected .xlsm workbook and one machine where the workbook still opens successfully. Export or record the applied Group Policy results with gpresult or the Group Policy Management Console so the configurations can be compared.
Compare the applied Group Policy settings with a working Excel configuration
Use this approach when the error began immediately after a policy deployment or disappears after the policy is removed.
Focus on Office administrative template settings that affect macros, file blocking, Protected View, trusted locations, and Excel application behavior. A policy can override settings that users normally change in Excel Trust Center.
On each device, open Command Prompt as an administrator and run gpresult /h C:\Temp\gpresult.html. Open the report and compare the Applied Group Policy Objects and Office-related settings.
In Group Policy Management Editor, go to User Configuration or Computer Configuration > Policies > Administrative Templates > Microsoft Excel 2016 > Excel Options > Security. Review macro notification settings, File Block Settings, Trusted Locations, and Protected View policies for restrictions affecting .xlsm files.
In Group Policy Management Console, select the affected organizational unit and review Linked Group Policy Objects, Enforced links, security filtering, and WMI filters. Confirm that no additional policy is applying only to the affected devices or users.
Apply the revised policy to a test organizational unit or test user, then run gpupdate /force and restart Excel. Open the approved .xlsm workbook before deploying the change broadly.

Verify the XLSM file association and approved workbook location
Use this approach when the policy comparison does not reveal a direct Excel setting or when only certain macro-enabled files fail to open.
Use WPS Office as a Lightweight Alternative for Excel Workbook Access
If Microsoft Excel Group Policy restrictions are disrupting access to approved workbooks, WPS Office offers a free, lightweight office suite with a familiar spreadsheet interface and straightforward migration for common Microsoft Office files. It can provide an alternative environment for opening and reviewing workbook content while your administrator validates macro and policy requirements.

Frequently Asked Questions
Which Group Policy settings can prevent Excel from opening an XLSM file?
Review Office administrative template settings for macro notifications, File Block Settings, Protected View, trusted locations, and policies that block macros in files from untrusted sources. Check both User Configuration and Computer Configuration because either scope can apply.
Why does Excel show a file format or extension error only after Group Policy is applied?
A policy may change how Excel handles macro-enabled file types, trusted paths, downloaded files, or file associations. Compare gpresult reports from a working device and an affected device to find the setting that changed.
How do I make XLSM files open with Microsoft Excel by default?
Right-click an .xlsm file in File Explorer, select Open with > Choose another app, choose Microsoft Excel, select Always use this app to open .xlsm files, and then select OK.
Can I add a trusted location when the Excel button is disabled?
No. A disabled trusted-location control usually means the setting is managed by Group Policy. Ask the Microsoft 365 or Windows administrator to review Excel Options > Security > Trusted Locations in the Office administrative templates.
Should I disable all macro security policies to fix the error?
No. Do not broadly disable macro protection. Instead, identify the specific conflicting policy, use an approved trusted location where appropriate, and test the revised configuration on a pilot device before wider deployment.




