Fix Excel Temporary Files Remaining on Network Share
Question details
Users are experiencing an issue where temporary files generated by Excel do not automatically delete from a network share after a network interruption.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Editing and saving shared spreadsheet files on a network server or shared drive.
- Observed behavior
- Excel temporary files (often starting with ~$) remain visible on the network share instead of disappearing normally, due to unresolved file handles or opportunistic locking after a network drop.
Verify that your network connection has been fully restored and ensure no other users on the network currently have the affected shared file open on their devices.
Allow Server Caching to Clear and Manually Delete Orphaned Files
Wait for the network server to recognize the connection drop and release the file handles before manually clearing the leftover temporary files.
When a network interruption occurs, the server may keep file handles and opportunistic locks active because it assumes the client might reconnect. These processes block Excel's standard cleanup routines from removing the temporary files.
While some users attempt to change the file's Archive attribute as a workaround, this attribute is primarily intended for backup systems and does not govern Excel's temporary file deletion mechanics.
Allow enough time for the network share's server caching and opportunistic locking timeout period to expire (this varies by server configuration but typically takes a few minutes).
Check with other colleagues on the network to confirm that no one is still attempting to edit or save the original Excel file.
Navigate to the network share folder using File Explorer, locate the leftover temporary files (usually displaying as hidden files starting with '~$'), select them, and press Delete.

Restart Workstation to Force Disconnection
A system restart will force the operating system to drop hanging network sessions that might be keeping the temporary files locked.
Try WPS Office for Seamless Spreadsheet Management
If you are frustrated by persistent file locking and temporary file clutter on network drives, consider switching to WPS Office. It provides a lightweight, highly compatible, and fast alternative for handling spreadsheets across different network environments.
- 1. Download the installer: Visit the official WPS Office website and download the free installation package.
- 2. Install WPS Office: Run the setup file and follow the on-screen instructions to complete the installation.
- 3. Open network files seamlessly: Launch WPS Spreadsheets and open your network files directly with full formatting compatibility.

Frequently Asked Questions
Why does a network drop cause Excel temporary files to stay?
When the network disconnects abruptly, Excel loses communication with the network server. The server retains a lock on the file assuming the session is still active, preventing Excel's cleanup process from deleting the temporary file once the program closes.
Can I prevent Excel from creating temporary files on the network share?
No, Excel requires temporary files to operate safely. They store locking information and unsaved changes to prevent multiple users from overwriting each other's work and to assist in file recovery.
What is the Archive attribute's role in temporary files?
The Archive attribute is a file-system metadata tag used to mark a file that has been modified and needs to be backed up. It does not control or trigger Excel's temporary-file cleanup process.
Why does this issue happen on a Windows share but not in some other client-server setups?
Different servers handle opportunistic locking and file caching differently. A Windows network share has specific locking behaviors that may hold a disconnected session's file handle longer than other customized client-server configurations.




