[BUG] When saving xlsm files using VBA, openpyxl destroys all cell formulas (replacing them with cached values).
Resolved 💬 3 comments Opened Apr 15, 2026 by klausrattenbacher Closed Apr 19, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code did today:
▎ When saving xlsm files using VBA, openpyxl destroys all cell formulas (replacing them with cached values).
▎ What happened in this session: all formulas in PoetrySlamAuswertungen.xlsm were corrupted.
What Should Happen?
So that was my mistake – I used openpyxl even though it isn’t suitable for xlsm files with VBA.
Restoring the formulas then took you about 5 hours. I’m sorry about that.
Error Messages/Logs
Steps to Reproduce
- Analysis sheet restored from backup (Copy-0414-14:11.xlsm) (rows 1–115)
- External file references cleaned up using Copy() via PowerShell
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code 2.1.109
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗