File Corruption & Recovery

How to Fix Excel Repairing XLSM Files and Removing Formulas

Amos GikundaAmos Gikunda Nov 10, 2026 868 views

Question details

Excel forcefully repairs large XLSM workbooks, removing complex formulas and VBA, leaving only cached values.

How to Fix Excel Repairing XLSM Files and Removing Formulas
Product
Microsoft Excel
Device & OS
not provided
Scenario
Opening a large XLSM workbook containing cloud storage links, VBA, and complex modern functions (like LET, LAMBDA, XLOOKUP, MAP, SWITCH, and CHOOSECOLS) after a recent security update.
Observed behavior
Excel prompts a repair process that strips out formulas and VBA macros, replacing them with static cached values.
Before you start

Create a backup copy of your affected XLSM file and set it to read-only before attempting any troubleshooting steps to ensure you do not overwrite the original data.

Solution 1Recommended

Open the XLSM File in Windows Excel

Since the repair-engine behavior differs between operating systems, a file that triggers a destructive repair on Mac may open flawlessly on a Windows PC.

Compatibility and repair engine defects occasionally affect macOS versions of Excel more aggressively than Windows versions. Transferring the file to a Windows environment can sometimes bypass the forced repair and preserve your VBA and complex formulas.

1
Transfer the workbook

Copy the corrupted XLSM file to a computer running the Windows version of Microsoft Excel.

2
Work offline

Temporarily disconnect the computer from the internet. This prevents OneDrive from syncing and disables AutoSave during your test.

3
Open and inspect

Open the file in Windows Excel. Check if the repair notice is bypassed and if your LET, LAMBDA, and XLOOKUP formulas remain intact.

4
Save a new copy

If the file opens successfully, go to File > Save As and save the workbook under a completely new name before transferring it back.

Open the XLSM File in Windows Excel
Important: Always perform these tests on a copy of your workbook, never the original.
Free Microsoft Office alternative

Try WPS Office for Better XLSM Compatibility

If Microsoft Excel continues to incorrectly repair and strip formulas from your XLSM files, try opening them in WPS Office. It provides robust compatibility with advanced spreadsheet functions and VBA macros without the aggressive forced repairs of recent updates.

  1. 1. Download and Install: Get WPS Office for free from the official website and install it on your computer.
  2. 2. Open Your XLSM File: Launch WPS Spreadsheets and open your XLSM file directly to view your formulas and macros intact.
  3. 3. Save and Continue: Edit your workbook and save it in the standard Microsoft Excel format without losing compatibility.
Seamless compatibility with Microsoft Excel formats (.xlsx, .xlsm, .xls).Supports advanced formulas, functions, and VBA macros.Free, lightweight, and fast alternative to Microsoft Office.Familiar user interface with zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel replace my formulas with cached values during a repair?

When Excel detects file corruption or encounters a compatibility issue with complex formulas (like LET, LAMBDA, or XLOOKUP) after a security update, its repair engine may strip out the unreadable components to salvage the calculated data, leaving only static cached values behind.

Should I use LibreOffice to recover my corrupted XLSM file?

It is not recommended. While LibreOffice might open the workbook without immediately triggering Excel's repair prompt, it lacks full compatibility with modern Excel functions and VBA. Saving the file in LibreOffice may cause permanent loss of these advanced elements.

How can I prevent AutoSave from overwriting my corrupted file?

Before opening a potentially corrupted workbook, disconnect your computer from the internet or open a copy of the file from a local, non-synced folder. This prevents AutoSave from automatically syncing the stripped, repaired version back to your OneDrive.

Does the operating system affect how Excel repairs files?

Yes, the Excel repair engine behavior can differ between Windows and macOS. An XLSM file that triggers a destructive repair and removes VBA on Mac Excel might sometimes open perfectly fine in the Windows version of Excel.