Forum Discussion

djflobo's avatar
djflobo
Copper Contributor
Apr 03, 2026

Excel repair strips all formulas from large .xlsm after March 2026 security update (KB5002849)

Hi everyone,

 

I'm a master's student at Karolinska Institutet in Stockholm. My thesis is a health economic cost-effectiveness model built entirely in Excel — a gender-neutral static Markov cohort model with 34 worksheets. The file has become completely unusable after what I believe is the March 2026 security update, and I'm running out of options.

 

The file:

- .xlsm, ~46.5 MB compressed, ~370 MB uncompressed XML

- 34 worksheets, four of which are 73–92 MB each (Markov trace sheets)

- ~65,000 formulas, ~33,500 shared formulas

- Heavy use of LET, LAMBDA, XLOOKUP, XMATCH, CHOOSECOLS, TAKE, MAP, SWITCH

- 771 defined names including ~147 hidden _xlpm.* LET/LAMBDA variable placeholders

- Stored on OneDrive via KI SharePoint, 34,000+ AutoSave revisions

- Contains VBA (vbaProject.bin)

 

The problem:

Every time I open the file — on Excel for Mac or Excel Online — the repair engine triggers and strips ALL formulas from every sheet, replacing them with cached values. The file shrinks from ~46.5 MB to ~26 MB. Clicking "No" on the repair dialog just closes the file. There is no way to bypass the repair.

 

What I've verified:

- Extracted the .xlsm as a ZIP and confirmed all formulas (<f> tags) are fully intact in the raw XML

- Libr€Office Calc can read the formulas but cannot execute them (Err:508 — no LET/LAMBDA support)

- Removed 158 broken named ranges (#REF! and #NAME? entries) from workbook.xml and rebuilt the archive — repair engine still strips all formulas

- The issue reproduces on every OneDrive version history copy (up until I largely used LET formulas in my sheets - but there is still 1,5months of changes lost)

- The issue reproduces on both Excel for Mac and Excel Online

 

Suspected cause:

The March 10, 2026 security update (KB5002849) patched CVE-2026-26108, a heap overflow in Excel's file parsing during loading. The same patch was applied to Office Online Server (KB5002846). I believe the tightened parsing now rejects or flags my file's large XML structures as potentially malicious, triggering the repair engine to strip all formulas. This is consistent with:

- The known _xlfn. namespace bug on Excel for Mac (reported by multiple users on Microsoft Q&A since late 2024)

- The timing - the file was working before this update flawlessly up until March 16th

- The fact that Excel Online is also affected (same server-side patch)

 

My questions to the community:

1. Has anyone else experienced formula stripping on large workbooks after the March 2026 update?

2. Is there a way to bypass the repair engine on Mac, or roll back the specific security patch without downgrading all of Office?

3. Would opening this file on Windows Excel (pre-patch or current) preserve the formulas? If anyone with a Windows PC would be willing to try opening and re-saving this file, I would be incredibly grateful.

4. Is there now effectively a size/complexity ceiling for Excel workbooks that makes models like this unviable? If so - should I be migrating this to another environment (R, Python, etc.) going forward?

 

This file represents six months of thesis work. The formulas are all there in the XML. I just need Excel to stop destroying them on open.

 

Any help, pointers, or similar experiences would be hugely appreciated.

 

Thank you,

Florian Boschek

6 Replies

  • SelinaKnow's avatar
    SelinaKnow
    Iron Contributor

    Libre-Office can be useful for opening a damaged workbook without immediately accepting Excel's repair prompt, but I would not use it to repair or re-save a model that depends heavily on LET, LAMBDA, XLOOKUP, and VBA. Its formula compatibility is different, so a file that opens there can still change meaning when it returns to Excel.

    For this case, Excel remains the correct target environment and the safer comparison is between an untouched original, a known-good OneDrive version, and a copy opened offline with AutoSave disabled. Preserve the original .xlsm as read-only, download earlier versions rather than restoring over them, and collect the repair log for Microsoft support. A generic spreadsheet recovery product may promise to recover formulas, but it is unlikely to understand the model's modern functions better than Excel itself.

  • Dudley James's avatar
    Dudley James
    Copper Contributor

    Office 365 (ver 16.111.3) running on Mac Book Pro 16 inch

    I have a large accounts .xlsm spread sheet for all my business. I started writing it in 2009 It's full of VBA from printing off invoices and completing VAT returns.  It has worked for many years now albeit slight problems over the years especially after the office 2011 upgrade

     I'm now semi-retired and the last time I used it was in March this year to fill in my VAT form.  Yesterday I started the accounts programme to see the a message box "Alert we found a problem problem the some content..... we can try to recover it Yes/No". clicking yes takes you too another message box "Excel was able to open the file by repairing or removing the unreadable content." view or delete.  View shows you a .xlm file "Removed Part: /xl/vbaProject.bin part.  (Visual Basic for Applications"

    The spread sheets are shown but all the VBA has been stripped out as per Florian Boschek

    I have tried renaming the file to no avail, trying previous versions of the code the same happens.  However running on a PC (not all the macros run) the macros are still present.

    Running the application on Version 14.7.7 Mac 2011 and all works ok

    Thank You

    Dudley 

     

    Update.  With the help of my old MBP and a Windows 11 Pc I eventually got it to work.

    The Excel code had removed all the VB files(Version 4)so I imported them from my old MBP whilst doing this very slowly one file would not load and it was the main menu.  This form loaded ok on both the old MBP and the PC so on the PC I made a very small edit to the wording and exported that file and then imported that form into what was now Version 5 it all worked fine.  I know it's not conclusive but it worked for me.  no doubt there will be more pain tomorrow 

     

    Thanks for your time

  • Patrick2788's avatar
    Patrick2788
    Silver Contributor

     

    3. Would opening this file on Windows Excel (pre-patch or current) preserve the formulas? If anyone with a Windows PC would be willing to try opening and re-saving this file, I would be incredibly grateful.

    Yes, this is worth a try. If you can open the file without a repair notice, you might be home free.

    My recommendation:

    1. Open the file in Safe mode on a PC
    2. File | Save As to create a new workbook with a different name
    3. Test on the Mac

    The reasoning:

    I work out of an AFE module daily for hours. I've gotten pretty good at finding ways to bonk Excel through stress testing.  One thing Excel does not like doing is repeatedly calculating large spill arrays and re-sizing large spill areas. It's one way to get the workbook stuck where it doesn't want to even do the simplest calculations.  I don't know if your workbook does this but it's worth a try.  It's my understanding Excel will re-constitute the calculation chain when a workbook is re-named.

  • Have you tried reporting the problem back to Microsoft?

    They certainly should be made aware of issues caused by a security update (assuming your diagnosis is correct) and may be able to help.  The only time I have had to switch to .xlsb format is when I exceeded an 8k limit on the number of characters forming a single formula, so not that relevant.

  • mohdadeeb's avatar
    mohdadeeb
    Iron Contributor

    Honestly, this doesn’t look like file corruption. It feels more like something changed in Excel after that March 2026 update.

    If your formulas are still visible in the XML (<f> tags), then Excel is probably removing them during the repair process on purpose likely because of stricter security rules.

    A couple of things you can try:

    • Open the file on a different system (preferably Windows if you're on Mac)
    • Download it and open it offline instead of OneDrive/Excel Online
    • Try an older Excel version if you have access
    • If the file is very large/complex, try simplifying it a bit (remove unused stuff, split sheets, etc.)

    This update seems to have tightened how Excel handles big or complex .xlsm files, so it might be hitting some internal limit or flagging something as unsafe.

    If nothing works, you might have to rebuild parts of it since the formulas are technically still there in the XML.

  • WassimN's avatar
    WassimN
    Tin Contributor

    Hellodjflobo​ 

     

    Oh Boy I sure do not want to be in your shoes! But my suggestion is to switch to the .xlsb binary format of Excel. It seems to be better for large files. Not that it will not crash and ruin your day, but maybe less often.

     

    I have seen plenty of great examples of Excel VBA code to backup your workbooks, and some are simply FANTASTIC!

     

    I suggest you start rebuilding the workbook from a clean up, and then Utilize the .xlsb file format with the VBA code that would automatically make a backup as you open the workbook. Some code exmples out there also prompt you to delete old versions of the workbook.

     

    And yes, one of the options in recovery is to recover the data by fixing all the formulas to their values.

     

    Try safe mode and see if the Repair process does not trigger.

    and yes Excel for Windows and the Mac should be identical in terms of functionality. Try an unpatched version and see if you can make 25 backups 🤪 but try the local library that may have PCs for the public to use. Here in the USA, most public libraries have computers for the public to use.

    I’m don’t have any information about size. But it’s been an issue from Excel’s day one! The XML format did help, but a little…

    As you are searching for the backup code, also search for the code that would list all the Conditional Formatting rules and see if you have duplicate rules. Sometimes Excel makes these duplicate rules when you copy/paste data. Cleaning these will make your workbook smaller and perform better.

    several years back, I started a project to rebuild a workbook and I got a lot done, but then abandoned this project for some reason or another. Maybe I’ll dig up the code and try again.

     

    Keep us posted as to your progress.