How to Fix Excel Temporary TMP Files Remaining in OneDrive After Closing
Question details
The user is experiencing an issue where Microsoft Excel generates visible temporary (.tmp) files in a OneDrive directory and fails to delete them automatically when the workbook is closed.

- Product
- Microsoft Excel, OneDrive
- Device & OS
- Windows
- Scenario
- Saving and closing Excel workbooks that are synchronized with Microsoft OneDrive.
- Observed behavior
- Instead of automatically clearing cache files upon exiting, Excel leaves visible .tmp files in the OneDrive folder, cluttering the directory.
Before proceeding with any troubleshooting steps, log into the OneDrive web portal to verify that your most recent Excel workbook changes have successfully synchronized and are safely saved online. Do not manually delete any remaining files until you confirm your data is intact.
Verify Online Sync and Reset OneDrive
Resetting the OneDrive sync client often resolves underlying synchronization glitches that prevent temporary cache files from clearing properly.
Temporary files are normally generated by Excel during the editing process to prevent data loss. Under normal circumstances, OneDrive syncs the main file and clears the .tmp cache when the application is closed. A stalled or corrupted OneDrive sync client can interrupt this cleanup process.
Open your web browser, navigate to the OneDrive website, and log in. Locate your Excel workbooks to ensure all recent edits are visible and correctly saved online.
Press the Windows Key + R simultaneously on your keyboard to open the Run command window.
Type '%localappdata%\Microsoft\OneDrive\onedrive.exe /reset' into the text box and press Enter or click OK.
Wait a few minutes for the OneDrive cloud icon to disappear and reappear in your system tray. If it does not reappear automatically, open the Start menu, search for OneDrive, and click to launch it.
Open an Excel workbook stored in OneDrive, make a small edit, save, and close the application to verify if the .tmp files are now clearing properly.
Create a New Local Windows User Profile
If resetting OneDrive does not fix the issue, your current Windows user profile might have corrupted permissions preventing Excel from deleting its own temporary files.
Try WPS Office for Seamless Cloud Document Management
If Microsoft Excel continues to create frustrating temporary files in your OneDrive folder, consider switching to WPS Office. It provides a lightweight, highly compatible alternative with seamless built-in cloud synchronization, avoiding messy file duplication and leftover .tmp files.
- 1. Download and Install: Visit the official WPS Office website to download the free installation package for your PC.
- 2. Open Your Spreadsheets: Launch WPS Spreadsheets and directly open your existing .xlsx workbooks.
- 3. Save to WPS Cloud: Enable WPS Cloud synchronization for a seamless auto-save experience without the clutter of leftover temporary files.

Frequently Asked Questions
Why does Excel create .tmp files in my OneDrive folder?
Excel automatically creates temporary cache files to prevent data loss and facilitate auto-recovery while you are editing a document. Normally, these files are hidden and deleted immediately when you close the workbook. They only remain visible when sync interruptions or permission conflicts in OneDrive prevent Excel from executing the cleanup command.
Is it safe to manually delete the leftover Excel .tmp files?
Yes, but you must first verify that your original Excel workbook has been completely saved and successfully synced to OneDrive online. If your latest edits are safely in the cloud, deleting the leftover .tmp files will not harm your data.
How can I prevent Excel from saving temporary files altogether?
Temporary files are a mandatory, built-in safety feature of Microsoft Excel and cannot be disabled. To prevent them from getting stuck, ensure that your OneDrive application is up to date, you maintain a stable internet connection, and you do not force-close Excel unexpectedly.
Does this temporary file issue affect Word and PowerPoint as well?
Yes, similar synchronization conflicts can occasionally happen with Microsoft Word (often appearing as ~$ files) and PowerPoint. The troubleshooting steps, such as checking the cloud portal and resetting the OneDrive sync client, apply to all Microsoft Office applications.




