Frequently Asked Question
This message usually means Excel saved the workbook, but could not immediately open it again because the file was still locked by Windows, the Nextcloud sync client, antivirus software, or a leftover temporary file.
The problem is commonly temporary, but if it happens regularly the steps below usually identify the cause.
Quick fix
Try these steps first:
- Close Excel completely.
- Wait
10to30seconds. - Open the file again from File Explorer, not from Excel’s Recent list.
If the file opens normally, the cause was most likely a short-lived file lock.
Most common cause with Nextcloud Sync
When a workbook is saved inside a Nextcloud-synchronised folder, Excel may finish saving but Nextcloud may still be processing the changed file. During that short period, Excel can fail to reopen it and report a sharing violation.
To test this:
- Right-click the Nextcloud icon in the Windows system tray.
- Pause synchronisation.
- Open the Excel workbook.
- Save it.
- Close it.
- Reopen it while synchronisation is still paused.
If the problem disappears while sync is paused, the Nextcloud desktop client is likely involved.
Check for a temporary Excel lock file
Excel creates temporary files while a workbook is open. If one of these remains behind after Excel has closed, it can block the file from reopening.
- Open the folder containing the workbook.
- Look for a file whose name starts with
~$.
Example:
~$Budget.xlsx
- Confirm Excel is fully closed.
- Delete the
~$file if it is still present. - Open the workbook again.
Do not delete the main workbook itself, only the temporary file beginning with ~$.
Make sure Excel is fully closed
Sometimes Excel remains running in the background even after the window is closed.
Check in Task Manager
- Press
Ctrl+Shift+Esc. - Open Task Manager.
- Look for any running
ExcelorMicrosoft Excelprocess. - End the task if Excel should no longer be open.
- Try opening the workbook again.
Open the file from File Explorer
Opening from Excel’s Recent list can occasionally point to a stale handle or trigger a reopen too quickly after save.
Use this method instead:
- Open File Explorer.
- Browse to the local Nextcloud folder.
- Double-click the workbook directly.
Check whether someone else has the file open
If the file is stored in a shared Nextcloud folder, another user may already have it open, or a sync conflict may be developing.
Check for:
- Another user editing the file
- A file marked as in use
- Duplicate or conflicted copies in the folder
- Recent edits from another device
If multiple people need to work in the same workbook, this can increase the chance of lock conflicts.
Test with a new workbook
This helps determine whether the issue is with one workbook or with the folder, sync client, or Windows environment.
- Create a new Excel workbook in the same Nextcloud folder.
- Save it.
- Close it.
- Reopen it.
If the new workbook works
The original workbook may be the problem. Possible causes include:
- Workbook corruption
- Complex formulas, links, or add-ins
- Macros or external data connections
- Embedded content holding the file open
If the new workbook fails in the same way
The cause is more likely to be:
- Nextcloud sync locking
- Antivirus scanning
- Windows file protection
- A broader Office or sync client issue
Test antivirus or endpoint protection
Real-time scanning can briefly lock Office files immediately after they are saved.
To test:
- Temporarily pause or disable real-time antivirus scanning, if permitted by company policy.
- Try saving and reopening the workbook again.
If the issue stops, add the local Nextcloud sync folder to the antivirus exclusions list.
Common example path:
C:\Users\<username>\Nextcloud\
Only make security changes in line with organisational policy.
Test Windows ransomware protection or Controlled Folder Access
Windows security features can interfere with Office applications writing to synchronised folders.
To test:
- Open Windows Security.
- Go to Virus & threat protection.
- Open Ransomware protection.
- Temporarily disable Controlled folder access, or allow Excel and Nextcloud through it.
- Test the workbook again.
If this resolves the issue, configure an exception rather than leaving the feature disabled.
Update Office and the Nextcloud desktop client
Older versions of Excel or the Nextcloud client can cause file lock timing issues.
Update Microsoft Office
- Open Excel.
- Go to File > Account.
- Select Update Options > Update Now.
Update Nextcloud Desktop
- Open the Nextcloud desktop client.
- Check for available updates.
- Install the latest version.
- Restart Windows after updating.
Restart the Nextcloud client
If the sync client has become stuck or is holding file handles open, restarting it often clears the condition.
- Right-click the Nextcloud icon in the system tray.
- Exit the client completely.
- Start Nextcloud again from the Start menu.
- Allow it to settle.
- Test the file again.
Restart Windows
If the file lock is held by a background process and is not obvious, a restart can clear it.
Use this when:
- Excel has been closed but the file still will not reopen
- The
~$file returns repeatedly - Nextcloud has been paused or restarted and the problem remains
If the issue affects one file only
Where only one workbook is affected, try repairing it:
- Open Excel first.
- Use File > Open.
- Browse to the file.
- Select the workbook.
- Use the arrow next to Open.
- Choose Open and Repair.
If it opens, save it as a new file name in the same folder and test again.
If the issue happens every time in Nextcloud folders
A practical workaround is to edit the file outside the synchronised folder and then copy it back once finished.
Example workflow:
- Copy the workbook to a local non-synchronised folder such as:
C:\Temp\
- Edit and save it there.
- Close Excel.
- Copy it back into the Nextcloud folder.
This avoids immediate sync interference while editing, though it is less convenient and should be used mainly as a temporary measure.
Summary
The error usually comes from a temporary file lock after saving. The most effective checks are:
- Close Excel and wait briefly before reopening
- Open the file from File Explorer
- Pause Nextcloud sync and test again
- Delete any leftover
~$lock file after Excel is closed - Check for antivirus or Windows security tools locking the file
- Test with a brand new workbook in the same folder
- Update Office and the Nextcloud desktop client
If the fault only affects one workbook, the file itself is the likely cause. If it affects all Excel files inside the Nextcloud folder, the sync client or Windows security software is usually responsible.
