Skip to content

v0.4.0 — the raw layer: lossless, addressable, writable OOXML

Choose a tag to compare

@CocoRoF CocoRoF released this 07 Jul 08:02
· 25 commits to main since this release
29f0c3d

Two views of every document: the AI-friendly extraction pipeline, and the new open_raw() — a lossless, addressable, writable model of .xlsx / .docx / .pptx.

from contextifier import open_raw

raw = open_raw("report.xlsx")
raw.sheets["Sales"].set_cell("B3", 142)
raw.charts[0].set_data(categories=["Q1","Q2","Q3"], series=[("Sales",[120,142,150])])
raw.save("edited.xlsx")   # untouched parts round-trip byte-identical
  • Byte-preservation save contract — sparklines, custom XML, chart styles, pivots and everything else the usual Office libraries destroy on load→save all survive (contrast-tested against openpyxl 3.1.5).
  • XLSX: surgical set_cell (style preserved), append_rows, cached-formula reads, calcPr fullCalcOnLoad on formula overwrite.
  • DOCX: python-docx-compatible addressing, run-preserving paragraph/cell edits (inline images survive), table row ops, nested tables.
  • PPTX: shape inventory, format-preserving text/table edits, native-preserving replace_content, orphan-sweeping remove_slide.
  • ChartModel: one implementation for all three formats — reads AND writes chart data/titles (Office-reopen verified), chartEx read.

598 tests. See CHANGELOG for details.