Excel Sharing Violation: Causes and Fixes

How-to basics · Updated November 2, 2026

Excel Sharing Violation: Causes and Fixes

An Excel sharing violation usually means Excel cannot save to the workbook because another user, program, or file-system rule is blocking access. First, preserve your changes with File > Save As and save a separate copy somewhere you can write to; then check whether the original file is still open elsewhere, locked, or restricted by its location or permissions.

What an Excel sharing violation means

A sharing violation is an access conflict, not a spreadsheet formula error. Excel can open a workbook and let you edit it, yet fail when it tries to write the finished changes back to the original file. Depending on the version of Office and where the workbook is stored, the message may say that the file is in use, locked for editing, unavailable, or that Excel could not save the document. The wording can vary even when the underlying issue is that another process has a handle on the file or Excel lacks permission to replace it.

When saving, Excel needs to update the workbook file in its folder. That operation can be blocked if another person has an incompatible editing lock, a sync client is processing the file, or Windows cannot create, change, or replace files in that location. The message does not by itself prove that the workbook is damaged, and it does not mean you need to change a formula or reinstall Excel.

Keep the unsaved workbook open while you work through the problem if possible. If Excel offers a read-only copy or another recovery option, do not assume that it contains the latest edits; check the content before relying on it.

Common reasons Excel cannot save

The cause is often related to who or what currently has access to the file. A workbook stored on a shared folder can be open in another person’s desktop Excel session, or in another Excel window on your own computer. A background process may also be reading or scanning the file at the moment Excel tries to save.

  • Another editor has the workbook open. Excel may allow a second person to view a file read-only rather than let both people overwrite it. Some file-sharing setups do not support simultaneous editing reliably.
  • A previous Excel session did not close cleanly. A process that remains active after a crash or forced shutdown can retain a file lock.
  • The folder does not allow changes. You may be able to open a workbook in a folder where you cannot create or replace files, or the file itself may be marked read-only.
  • A network or removable drive is unavailable. A disconnected mapped drive, unstable connection, or access change can interrupt a save.
  • Cloud synchronization is in progress or has a conflict. OneDrive, SharePoint, or another sync service may be uploading, downloading, or reconciling a copy while Excel is saving.
  • Security software or another application is scanning the file. This can briefly interfere with access, though it is not a reason to turn off protection indiscriminately.

More than one condition can be involved. For example, a workbook on a company network share may be open by a coworker while the network connection is also unstable.

Protect your edits before troubleshooting

Start by making a separate copy of the work you have already done. In Excel for Microsoft 365 on Windows, choose File > Save As > Browse, select a folder on your local computer where you have permission to save, and give the copy a distinct name. Avoid saving over the original while you are diagnosing a lock. If the Save As command is available, F12 also opens the Save As dialog in desktop Excel for Windows.

After saving, open the copy and confirm that it contains the latest rows, formulas, formatting, and any other changes you need. This check matters because a new copy can preserve your current edits without resolving the original file’s conflict. Do not close the only open workbook until you have either saved a verified copy or accepted that some changes could be lost.

If Excel will not save even to a new local file, use a safe recovery step: copy the needed worksheet data into a new workbook if you can, or use Excel’s available recovery prompts. Pasting a sheet into a new workbook may not carry over every workbook-level feature, such as connections, macros, or some defined names, so inspect the result before treating it as a complete replacement.

Check whether another session has the file open

Ask coworkers who use the shared folder whether they have the workbook open, including in Excel for the web. Check your own open Excel windows as well; multiple windows can make it easy to overlook a session. If someone is editing the workbook, coordinate a time to close it or use a supported coauthoring location rather than having people repeatedly retry the save.

On Windows, Excel commonly creates a small temporary owner file in the same folder while a workbook is open. Its name starts with ~$ followed by part of the workbook’s name. This can be a clue that the workbook has an active editing session, but it is not a reliable way to identify every lock or its owner. Hidden files may not be visible in File Explorer, and a temporary file can remain after an abnormal shutdown.

Do not delete a ~$ file while anyone may still have the workbook open. Removing it during an active session can interfere with locking and risk conflicting edits. First have all editors close the workbook and confirm their Excel sessions have ended. If a lock appears stale but the file remains blocked, ask the folder owner or IT administrator to investigate, especially on a business network. Force-quitting Excel should be a last resort because unsaved work in that process can be lost.

Review file and folder permissions

In File Explorer, right-click the workbook, choose Properties, and check whether the Read-only attribute is selected on the General tab. If you are authorized to edit the file, clear that attribute and try saving again. This setting is different from security permissions: the folder may still deny you permission even when the file is not marked read-only.

Try creating a small test file in the same folder. If Windows will not let you create or rename a file there, the issue is likely with folder access, the share, or the drive rather than the workbook itself. A folder often needs permission to create, modify, or delete files for applications to replace an existing workbook during a save. Ask the folder owner or administrator to check your access; do not change company permissions or security settings without authorization.

If the workbook is on a mapped network drive, confirm the drive is connected and that you can browse to the folder again. A useful diagnostic is to save a separate copy locally, then retry the original only after the network is stable. A successful local save points toward the shared location or its access path, but it does not prove that the network is the only cause.

Handle OneDrive and SharePoint conflicts

For Microsoft 365 coauthoring, store the workbook in OneDrive or SharePoint and open the shared cloud copy using an account with edit access. Coauthoring availability depends on the file format, storage location, and supported Excel versions. A workbook on a traditional file share, a local folder that is merely synced, or an unsupported format may not behave like a cloud workbook designed for simultaneous editing.

Look at the OneDrive status icon and wait for pending sync activity to finish before repeatedly saving or renaming files. If Excel or OneDrive reports a sync conflict, avoid choosing a copy based only on its filename. Compare the versions and confirm which contains the most recent edits before replacing anything. If other people are editing, tell them before resolving the conflict so their changes are not overwritten.

For a workbook that must remain on a network share, coordinate editing or follow your organization’s file-sharing process. The older Shared Workbook feature is a legacy collaboration method and is not the same as modern Microsoft 365 coauthoring. It is not a general fix for a sharing violation, and enabling a legacy feature can limit workbook capabilities. For Excel for the web, there is no Windows desktop lock-file cleanup step; check the cloud file’s permissions, connection, and conflict messages instead.

What to avoid while fixing the error

Repeatedly clicking Save or opening several copies of the same workbook can make it harder to tell which version contains the newest work. Save a clearly named backup first, and keep track of which file is the original and which is your recovery copy. If a file is marked read-only because someone else is editing it, saving over it from another location can create competing versions rather than resolve the access conflict.

Do not disable antivirus software, Windows security protections, or organizational access controls just to test a save. If you suspect security software is blocking the operation, contact your IT administrator or consult the product’s approved support process. Similarly, do not force-close Excel until you have considered whether the affected session holds unsaved changes. Ending an Excel task can discard those changes and may not remove a lock held by another user or a server.

If a local backup saves successfully but the original continues to fail, keep the backup intact. Once access is restored, compare the two workbooks and move changes deliberately. Copying a newer file over the old one without checking can erase edits made by another person.

Prevent repeat sharing violations

For a workbook that several people need to edit, agree on one storage and collaboration method instead of passing around downloaded copies. Use a OneDrive or SharePoint location that supports coauthoring when appropriate, and make sure collaborators have the right account permissions. For a workbook that depends on features or workflows incompatible with coauthoring, schedule editing or use a managed network process that prevents simultaneous writes.

Other practical habits reduce confusion when a conflict does happen:

  • Use a descriptive filename and avoid several ambiguous copies such as “final,” “final2,” and “final revised.”
  • Wait for cloud synchronization to finish before shutting down or disconnecting from the network.
  • Close workbooks normally and allow Excel time to finish saving before ending a session.
  • Keep a separate backup for important work, especially before changing permissions or resolving conflicting versions.
  • Ask IT to review recurring failures on a shared drive; frequent locking can indicate a permissions, connectivity, or file-server issue.

On a Mac, the same basic diagnosis applies—another session, permissions, or a cloud conflict can prevent a save—but Windows Explorer attributes and Windows temporary lock-file guidance do not apply in the same way. Use Excel’s Save As options to preserve a copy, then check Finder permissions, the shared location, and the relevant cloud service. In Excel for the web, check the browser connection and file access rather than looking for a desktop Excel process.

Frequently Asked Questions

Does a sharing violation mean my Excel file is corrupted?
No. It usually points to an access or locking problem. Save a separate copy and check that it opens and contains your edits. If the copy also produces errors or will not open, investigate that separately as a possible file or application problem.

Can I delete the Excel ~$ lock file?
Only consider it after confirming that every user has closed the workbook and no Excel session is using it. The file may be an active lock, and deleting it prematurely can contribute to conflicting edits. If you are unsure, ask the file owner or IT administrator.

Why can I edit the workbook but not save it?
Opening and editing a workbook does not guarantee permission to replace it in its folder. Another editor may hold a lock, the file may be read-only, or the folder or network may block the write operation. Save a local copy first, then check the original’s access and location.

Will Save As fix the sharing violation?
It can preserve your current edits in a different file and is a useful first step, but it does not remove the lock or repair permissions on the original. Verify the new copy and address the underlying issue before replacing or merging files.

Does the error mean someone else is editing my workbook?
Not necessarily. Another user is one possible cause, but a leftover Excel session, a sync conflict, a network interruption, or insufficient folder permissions can produce a similar failure. Check the file’s location and access before concluding that a coworker has it open.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.