diff --git a/main.py b/main.py index b75038f..5b6fe22 100644 --- a/main.py +++ b/main.py @@ -483,7 +483,9 @@ async def apply_matches_endpoint(request: Request): fpath = work_dir / safe_name if not fpath.exists(): raise HTTPException(404, "File not found in work directory") - out_name = f"{Path(safe_name).stem}_filled.xlsm" + # openpyxl drops VBA macros when saving — write as .xlsx so Excel + # opens it cleanly even when the source was .xlsm + out_name = f"{Path(safe_name).stem}_filled.xlsx" out_path = work_dir / out_name try: result = apply_to_registry(fpath, out_path)