Skip to content

This release adds 2 notable features for engineering teams evaluating rollout.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

compound-file deterministic excel file-format macro-extraction ms-cfb
+13 more
ms-ovba office-automation openxml pure-python python roundtrip vba vba-macros xlam xls xlsb xlsm zero-dependencies

Summary

AI summary

Fixed Excel rejection of multi‑chunk VBA modules and duplicate PROJECT entries after delete.

Changes in this release

Feature Low

Added demo/ folder with runnable end‑to‑end VBA module demo (`push_demo_module.py`, `test_macro_workbook.xlsm`, `demo.md`).

Added demo/ folder with runnable end‑to‑end VBA module demo (`push_demo_module.py`, `test_macro_workbook.xlsm`, `demo.md`).

Source: llm_adapter@2026-05-27

Confidence: high

Feature Low

Added new regression tests for chunk compression and duplicate PROJECT handling.

Added new regression tests for chunk compression and duplicate PROJECT handling.

Source: llm_adapter@2026-05-27

Confidence: high

Feature Low

Added `tests/live_excel_testing/large_vba_module.xlsm` fixture for multi‑chunk module validation.

Added `tests/live_excel_testing/large_vba_module.xlsm` fixture for multi‑chunk module validation.

Source: llm_adapter@2026-05-27

Confidence: high

Bugfix Medium

Always emit token‑compressed chunks for VBA module source, fixing Excel rejection of multi‑chunk modules.

Always emit token‑compressed chunks for VBA module source, fixing Excel rejection of multi‑chunk modules.

Source: llm_adapter@2026-05-27

Confidence: high

Bugfix Medium

Prevent duplicate `PROJECT` entries when re‑adding a deleted module, avoiding Excel corruption.

Prevent duplicate `PROJECT` entries when re‑adding a deleted module, avoiding Excel corruption.

Source: llm_adapter@2026-05-27

Confidence: high

Full changelog

Fixed

  • Excel rejected modules whose source spanned more than one 4 KB chunk with "An error occurred while loading ". The MS-OVBA compressor was emitting raw (CompressedChunkFlag = 0) chunks for full 4096-byte blocks. Although spec-legal, Office itself never writes raw chunks for module source streams -- empirically confirmed against an Excel-authored workbook containing a 16,881-byte module (all five of its chunks were token-compressed). The compressor now always emits token-compressed (flag = 1) chunks for module source; raw chunks remain only as a fallback for adversarial 4096-byte high-entropy input that overflows LZ encoding.
  • Re-running an add-module workflow after a delete produced duplicate PROJECT entries, which Excel treats as corruption. Calling add_module(name, ...) after delete_module(name) in the same save now cancels the pending delete and treats the operation as a source rewrite, matching Excel's own behaviour. serialize_project_stream additionally scrubs duplicate Module= and workspace declarations on every structural save, healing files that were corrupted by earlier versions.

Added

  • demo/ folder containing a runnable end-to-end demo (push_demo_module.py + test_macro_workbook.xlsm + demo.md).
  • New regression tests:
    • TestCompress.test_full_chunk_emitted_as_token_compressed_not_raw and TestCompress.test_long_module_round_trip_through_excel_save verify that no raw chunks are produced for realistic VBA source.
    • TestLargeModuleFixture uses an Excel-authored 16 KB module as an empirical anchor and round-trips it through pyOpenVBA's saver.
    • test_delete_then_readd_same_name_does_not_duplicate_project_decl and test_save_heals_preexisting_duplicate_project_declarations cover the PROJECT-stream fix.
  • tests/live_excel_testing/large_vba_module.xlsm fixture (Excel-authored reference for multi-chunk module compression).

Full changelog: https://github.com/WilliamSmithEdward/pyOpenVBA/blob/main/docs/changelog.md
Compare: https://github.com/WilliamSmithEdward/pyOpenVBA/compare/v1.0.0...v1.0.1

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track WilliamSmithEdward/pyOpenVBA

Get notified when new releases ship.

Sign up free

About WilliamSmithEdward/pyOpenVBA

All releases →

Related context

Earlier breaking changes

  • v3.0.0 Renamed the `AccessFile` class to `AccessReader`.
  • v3.0.0 Renamed `pyopenvba.access` module to `pyopenvba.access_read`.
  • v1.1.1 `add_module(kind=other)` now requires an explicit attribute header; automatic synthesis is disabled.

Beta — feedback welcome: [email protected]