ExVEx.OOXML.Workbook (ExVEx v0.1.1)

Copy Markdown View Source

Parser for xl/workbook.xml — the per-workbook manifest of sheets.

Only the parts ExVEx currently reasons about are modeled: the sheet list. Every other top-level element (<workbookPr>, <bookViews>, <calcPr>, <definedNames>, etc.) is preserved in the source bytes by the caller and round-trips untouched unless explicitly mutated later.

Summary

Functions

Rewrites xl/workbook.xml so that its <calcPr> element carries fullCalcOnLoad="1" — forcing Excel to recompute every formula on open. Creates a <calcPr> element if one isn't present. All other worksheet content is preserved at the element level via Saxy SimpleForm round-trip.

Types

t()

@type t() :: %ExVEx.OOXML.Workbook{sheets: [ExVEx.OOXML.Workbook.SheetRef.t()]}

Functions

parse(xml)

@spec parse(binary()) :: {:ok, t()} | {:error, term()}

set_full_calc_on_load(xml)

@spec set_full_calc_on_load(binary()) :: {:ok, binary()} | {:error, term()}

Rewrites xl/workbook.xml so that its <calcPr> element carries fullCalcOnLoad="1" — forcing Excel to recompute every formula on open. Creates a <calcPr> element if one isn't present. All other worksheet content is preserved at the element level via Saxy SimpleForm round-trip.