How to Fix "Errors Were Detected While Saving" in Excel
Question details
The user is trying to resolve an error message in Excel that prevents a file from saving properly.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Attempting to save an Excel workbook that may contain macros, VBA code, or corrupted data elements.
- Observed behavior
- Excel displays a warning stating that "errors were detected while saving" and fails to complete the save operation.
Before attempting to fix the save error, leave your current Excel window open and manually copy your most important data into a plain text editor (like Notepad) to ensure you do not lose any unsaved work.
Check VBA Code and Temporarily Disable Macros
Syntax errors in VBA or restrictive macro security settings are the most common causes of this save error.
If your workbook contains custom macros, a runtime or syntax error in the code can interrupt the saving process. Disabling macros temporarily allows you to isolate the problem.
Press Alt + F11 on your keyboard to launch the Microsoft Visual Basic for Applications editor. Check the code modules for any highlighted syntax or runtime errors.
In Excel, click on 'File', select 'Options' at the bottom left, and then click on 'Trust Center'. Click the 'Trust Center Settings' button.
Navigate to the 'Macro Settings' tab on the left. Select the option to temporarily disable VBA macros, then click 'OK' to apply the changes.
Return to your workbook and try saving the file again. If it saves successfully, the issue is related to your macro code.

Copy Worksheets to a New Workbook
Moving your data to a fresh, uncorrupted workbook can bypass hidden structural errors in the current file.
Save the File in a Different Format
Changing the file format to a simpler version can strip away the corrupted elements causing the error.
Try WPS Office to Avoid Excel File Save Errors
If Microsoft Excel frequently struggles with VBA conflicts or file corruption, switching to WPS Office provides a stable, lightweight environment. It is fully equipped to handle complex spreadsheets without the heavy resource usage that often leads to save errors.
- 1. Download and Install WPS Office: Get the free WPS Office suite from the official website and install it on your computer.
- 2. Open Your Problematic File: Launch WPS Spreadsheet, click 'Open', and select the Excel file that was failing to save.
- 3. Save Without Errors: Click 'Menu' > 'Save As', select your preferred Microsoft Excel format (.xlsx), and seamlessly save your work.

Frequently Asked Questions
Why does Excel say "errors were detected while saving"?
This error typically occurs when there is a syntax problem in your VBA macro code, the workbook's internal structure has become corrupted, or there are unexpected network permission issues when saving to a shared drive.
Will saving the file as a CSV delete my formulas?
Yes. Saving as a CSV (Comma Separated Values) format will preserve only the raw text and calculated values of the active sheet. All formatting, macros, and underlying formulas will be removed, which is why it bypasses the save error.
How do I check for VBA errors if I don't know how to code?
Press Alt + F11 to open the VBA editor. Go to the 'Debug' menu at the top and select 'Compile VBAProject'. If there is an obvious syntax error, Excel will immediately highlight the problematic line of code for you.
Is there a way to force Excel to repair the corrupted workbook?
Yes. Open a blank Excel window, click 'File' > 'Open', and browse to your file. Instead of just clicking 'Open', click the small arrow next to the 'Open' button and select 'Open and Repair...' to let Excel attempt to fix the corruption.




