Fix Excel Closing All Open Workbooks in OneDrive
Question details
Closing a single Excel file stored in OneDrive unexpectedly forces all other currently open Excel workbooks to close.

- Product
- Microsoft Excel, Microsoft OneDrive
- Device & OS
- Windows
- Scenario
- Working with multiple Excel workbooks simultaneously that are synced to OneDrive.
- Observed behavior
- When the user closes one OneDrive-stored Excel file, all open Excel files close automatically. Workbooks saved outside of OneDrive are unaffected and close normally.
Before troubleshooting, save copies of your open workbooks to your local hard drive (outside of OneDrive) to prevent any data loss during the repair process.
Adjust OneDrive Sync and Files On-Demand Settings
Since the issue isolates to OneDrive files, modifying how OneDrive syncs files to your PC can resolve file-locking and crashing conflicts.
OneDrive's 'Files On-Demand' feature can occasionally cause communication errors with Microsoft Excel, leading to the application crashing or closing all windows when syncing a closed file.
Click the OneDrive cloud icon in your Windows taskbar, click the gear icon, and select 'Settings'.
Navigate to the 'Sync and back up' or 'Advanced settings' tab and find the 'Files On-Demand' section.
Toggle off or disable 'Files On-Demand' so that your files are kept locally on your device, which reduces active sync interruptions.
Restart your computer, open a few Excel files from your OneDrive folder, and test closing just one of them.

Run Excel in Safe Mode to Isolate Add-ins
Safe Mode bypasses third-party add-ins that might conflict with OneDrive synchronization upon closing a file.
Perform an Online Repair for Microsoft Office
If core Office files are corrupted, a built-in Online Repair can fix the communication bridge between Excel and OneDrive.
Switch to WPS Office for a Stable, Tabbed Experience
If Excel continues to close all your files due to OneDrive conflicts, consider switching to WPS Office. It provides a stable, lightweight environment with a built-in tabbed interface, ensuring that closing one spreadsheet never accidentally closes your other work.
- 1. Download WPS Office: Download and install WPS Office for free from the official website.
- 2. Open the Spreadsheet App: Launch WPS Spreadsheet to access your files.
- 3. Edit Seamlessly: Open your existing .xlsx files directly; no format conversion is needed, and your multiple files will open in neat, manageable tabs.

Frequently Asked Questions
Why does Excel close all windows when I only click 'X' on one file?
This is often caused by a glitch in how Excel handles background sync processes with OneDrive, or conflicts with active COM add-ins. Sometimes, clicking the top-right 'X' closes the entire Excel application instance rather than just the active workbook.
Does formatting my PC fix Excel OneDrive synchronization issues?
Not always. As experienced by many users, reinstalling Windows or formatting storage may not resolve the issue if the bug is tied directly to your specific OneDrive account settings, Files On-Demand features, or corrupted cloud files.
How can I separate Excel windows to prevent them all from closing at once?
You can force Excel to open files in entirely separate instances by holding the 'Alt' key while clicking the Excel shortcut in your taskbar. Keep holding 'Alt' until prompted to start a new instance, click 'Yes', and then open your second file from within that new isolated window.




