logo
search
Permission & Access Issues

How to Fix Excel Ignoring Read-Only for XLSM Files on SharePoint

Khadija KhanKhadija Khan Oct 12, 2026 869 views

Question details

Excel ignores standard read-only commands and attributes when opening an XLSM file hosted on SharePoint, forcing it to open in edit mode.

How to Fix Excel Ignoring Read-Only Settings for XLSM Files on SharePoint
Product
Microsoft Excel and SharePoint
Device & OS
not provided
Scenario
A user is attempting to open a macro-enabled workbook (XLSM) directly from a SharePoint environment in read-only mode using various methods like the /r switch or context-menu.
Observed behavior
Excel completely ignores the /r command-line switch, the read-only context-menu option, the 'Always Open Read-Only' setting, and the file's read-only attributes when the file is on SharePoint, although these work perfectly when stored locally.
Before you start

Ensure you have proper access rights to the SharePoint site and check if the XLSM file is currently locked or checked out by another user, as server policies can override local application settings.

Solution 1Recommended

Verify SharePoint Library Checkout and File-Locking Policies

SharePoint's server-side document library settings dictate how files are opened, frequently overriding local Excel read-only commands.

When files are hosted on SharePoint, the server's collaboration and file-locking protocols take precedence over local Excel switches like '/r'. If the library is not configured to force a checkout, or if your user account has edit permissions, SharePoint may automatically push the file to Excel in edit mode.

1
Access Library Settings

Navigate to your SharePoint document library, click the Settings gear icon in the top right, and select 'Library settings'.

2
Check Versioning Settings

Click on 'Versioning settings' and scroll down to the 'Require Check Out' section. If this is set to 'No', multiple users can edit simultaneously, which can bypass local read-only preferences.

3
Adjust File Permissions

If you need the file to always be read-only for certain users, adjust the specific file's access permissions to 'View Only' directly within SharePoint rather than relying on Excel's local settings.

Verify SharePoint Library Checkout and File-Locking Policies
SharePoint Integration: For highly specific Office LTSC environment configurations, you may need to consult your IT admin or the Office Management section of Microsoft Q&A.
Free Microsoft Office alternative

Try WPS Office for Seamless Spreadsheet Management

If Microsoft Excel's integration with SharePoint is causing frustrating file-locking conflicts, consider WPS Office as a lightweight, free alternative. It offers high compatibility with Microsoft formats without complex server-side configuration overhead.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free office suite.
  2. 2. Open Your XLSM File: Launch WPS Spreadsheets and open your downloaded XLSM file to view its contents and macros.
  3. 3. Manage Read-Only Modes Easily: Use WPS Office's built-in file protection and read-only modes without interference from SharePoint sync protocols.
Highly compatible with Microsoft Excel formats including XLS, XLSX, and XLSMFree and lightweight Office suite with rapid load timesFamiliar user interface with zero learning curve for Excel usersAvoid complex SharePoint file-locking conflicts by managing files effortlessly
microsoft office alternative - wps office

Frequently Asked Questions

Why does the /r switch work locally but not on SharePoint?

SharePoint uses specialized WebDAV and cloud sync protocols that bypass standard local command-line switches like /r. The application prioritizes the server's permission levels and checkout status over local parameters.

How do I force an XLSM file to open as read-only for all users?

The most reliable method is to configure the file's permissions directly within SharePoint. Share the file with 'View Only' permissions, or configure the document library to 'Require Check Out' to prevent accidental edits.

Does the 'Always Open Read-Only' Excel setting work with OneDrive?

This local application setting is frequently overridden by Microsoft 365's AutoSave and collaborative co-authoring features when files are hosted on cloud platforms like SharePoint or OneDrive.