If an affected file is still open, do not close the application—immediately use File > Save As or Save a Copy and save it to a local folder outside OneDrive or to another drive.
An interrupted Office save can leave the current changes open in memory while the original file has already been deleted and the temporary file has not yet received the original name. Saving to another location preserves that in-memory copy. Excel’s documented save process creates a temporary file, deletes the original, and then renames the temporary file; antivirus, software, storage, or other interruptions can disrupt that sequence.^1^
The same cross-application symptom has been reported for OneDrive files on Windows, but there is no published Microsoft advisory confirming one universal cause or fix.^2^
Recover the affected files
- Preserve every candidate first.
- Copy the
.temp, .tmp, .tmp.upload, or similarly named file to a local folder outside OneDrive.
- Do not delete or modify the only copy.
- If Windows will not rename it, the file may still be in use. After preserving any open document through Save As, close Office and restart Windows, then try copying it again.^3^
- Try recovering from a copied temporary file.
- Rename only the copy with the expected extension:
.docx, .xlsx, or .pptx.
- This is only a recovery attempt; changing the extension does not convert the file or guarantee that it contains a complete Office document.
- Open the corresponding Office application and select File > Open > Browse. Select the copied file, choose the arrow beside Open, and then select Open and Repair.^4^
- Check the authoritative cloud copy.
- Open the OneDrive website and use Search everything.
- Check Recycle bin and restore the original if present.
- If subscribed to Microsoft 365 and many files were affected, Restore your OneDrive can undo file and folder actions from the previous 30 days. Files created after the selected restore point are moved to the OneDrive Recycle Bin, so preserve current work first.^5^
- For missing Word content, check:
- Word > File > Info > Manage Document > Recover Unsaved Documents
-
%AppData%\Roaming\Microsoft\Word
-
%LocalAppData%\Microsoft\Office\UnsavedFiles
- Windows searches for
*.asd, *.wbk, *.tmp, and files beginning with ~.^6^
Isolate OneDrive from the Office save operation
After recovering the files:
- Create a test document in a local folder that is not under OneDrive, such as
C:\OfficeTest.
- Edit and save it repeatedly in the application that demonstrated the problem.
- Repeat with a new file in OneDrive.
- Record any Office save message and the status shown by the OneDrive taskbar icon.
If only the OneDrive copy fails, concentrate on OneDrive integration and the Office document cache. If both copies fail, investigate software that can intercept file replacement operations, particularly security software or a recently installed/updated process; Microsoft specifically documents that another process accessing the temporary file can interrupt Excel before it is renamed.^1^
Clear the Office cache only when its symptoms apply
Use this branch if OneDrive remains Sync pending, Office reports a Document Cache/upload error, or temporary Office files remain stuck after all Office applications are closed:
- Preserve recoverable files and close all Office applications.
- If Microsoft Upload Center is available, open it and select Settings > Delete Cached Files.
- Restart Windows and allow OneDrive to synchronize again.
The Upload Center is associated with older Office components and may not be visible in a current Microsoft 365 installation; newer versions maintain the cache in the background. For a damaged cache that cannot be cleared normally, Microsoft’s full procedure requires administrator rights, a Windows clean boot, cache deletion, and a normal reboot.^7^
Cache cleanup is a conditional troubleshooting action, not a confirmed fix for every instance of this symptom. Do not delete temporary files until recovery is complete; Microsoft warns that doing so can discard unsaved work.^3^
If the controlled test still reproduces the replacement, contact Microsoft Support with the Office and OneDrive version numbers, exact temporary filename pattern, timestamps, whether the local-folder test succeeds, and screenshots of any save or sync errors.
References
- Troubleshoot why Excel doesn't save changes
- Office Apps keep turning my files into .temp files - Microsoft Q&A
- OneDrive is stuck on "Sync pending" | Microsoft Support
- Open a document after a file corruption error | Microsoft Support
- [Personal](https://support.microsoft.com/onedrive/find-lost-or-missing-files-in-onedrive)
- How to recover unsaved Word documents
- Delete your Office Document Cache