write — create files
Create new Office files from structured JSON.
Basics
zagens-office write pptx --path out.pptx --input-file deck.json
zagens-office write docx --path out.docx --input-file doc.json
zagens-office write xlsx --path out.xlsx --input-file sheet.json --workspace .
zagens-office write pdf --path out.pdf --input-file doc.json
- Simple payloads may use
--input '{...}'; prefer--input-filefor complex JSON (Windows quoting). - Optional
--preview stats|svgon docx/pptx attaches a one-step preview in the result.
Before you write
schema write <format>- Lock a theme palette in
theme - Run
edit --op validateimmediately after
PPT tips (short)
- Vary layouts between slides; keep pure-bullet slides under half the deck
- Comparison / icon rows: prefer
elements[].type:"flow" - SmartArt: default style only — do not set
styleornodes[].image - Prefer
x_pctin 0.0–1.0; values in (1,100] are treated as percents - Long decks: skeleton
write, thenedit --op upsert_slideper page
Full contract: schema write pptx.