Shared-source document workflow
Inspect doc.json, audience, units, periods and provenance. The starter uses
explicitly synthetic nominal USD and calendar quarters, not actual financials.
For a comparison report, edit comparison.currency, the two periods and
rows of region/prior/current values. Inputs must be finite and nonnegative.
The writer derives report prose, totals and growth; do not type parallel totals.
Or use sheet: {name, rows} for a generic literal-data report. Keep rows
rectangular, 1–10 columns, at most 1,000 rows. Word shows the first 30 data rows.
Title, subtitle, paragraphs and source text are normal editable strings.
Build:
sh "$SSD_SKILLS/sheetsdoc/scripts/export.sh"
Inspect every PDF page. Check line breaks, tables, margins and source labels.
Open/recalculate the workbook, change one input, confirm dependent results and
restore it. Reconcile report totals and prose to the same source.
Hand off DOCX, XLSX and PDF with the source and the checks actually performed.
Formula and source semantics
Comparison workbooks contain SUM, subtraction and guarded growth formulas.
Zero prior revenue yields “n.a.”, not zero percent. Blue numbers are editable
inputs; calculated values are dark. Cached formula values come from the same
inputs and the build re-saves the workbook with LibreOffice. Generic text beginning
with = stays literal and does not execute a user-supplied formula.
Exports do not round-trip to source. Editing out.xlsx updates its formulas only;
edit doc.json and rebuild to update the report and PDF together. Arbitrary formulas,
charts, PPTX and automated claims of accounting correctness are outside this writer.
Runtime and failures
Node 20+ and LibreOffice are required for the complete preview; use SOFFICE_BIN for
a nonstandard installation. Conversion runs with an isolated temporary profile,
not the user's open office session. The helper writes pending/failed verdicts,
requires fresh outputs, and never blesses an old PDF. Without LibreOffice it can
write the Office files but exits incomplete. Logs and receipts live in .harness.
Restyling is implemented in the portable OOXML writer. After changing it, verify
the actual exported document in an office runtime and inspect rendered pages.
1---2name: sheetsdoc3description: Build coordinated editable DOCX reports, formula-driven XLSX workbooks and fresh LibreOffice PDF previews from structured source. Use for Sheet & Docs Studio work.4---56# Shared-source document workflow781. Inspect `doc.json`, audience, units, periods and provenance. The starter uses9 explicitly synthetic nominal USD and calendar quarters, not actual financials.102. For a comparison report, edit `comparison.currency`, the two `periods` and11 `rows` of region/prior/current values. Inputs must be finite and nonnegative.12 The writer derives report prose, totals and growth; do not type parallel totals.133. Or use `sheet: {name, rows}` for a generic literal-data report. Keep rows14 rectangular, 1–10 columns, at most 1,000 rows. Word shows the first 30 data rows.15 Title, subtitle, paragraphs and source text are normal editable strings.164. Build:1718 ```sh19 sh "$SSD_SKILLS/sheetsdoc/scripts/export.sh"20 ```21225. Inspect every PDF page. Check line breaks, tables, margins and source labels.23 Open/recalculate the workbook, change one input, confirm dependent results and24 restore it. Reconcile report totals and prose to the same source.256. Hand off DOCX, XLSX and PDF with the source and the checks actually performed.2627## Formula and source semantics2829Comparison workbooks contain SUM, subtraction and guarded growth formulas.30Zero prior revenue yields “n.a.”, not zero percent. Blue numbers are editable31inputs; calculated values are dark. Cached formula values come from the same32inputs and the build re-saves the workbook with LibreOffice. Generic text beginning33with = stays literal and does not execute a user-supplied formula.3435Exports do not round-trip to source. Editing out.xlsx updates its formulas only;36edit doc.json and rebuild to update the report and PDF together. Arbitrary formulas,37charts, PPTX and automated claims of accounting correctness are outside this writer.3839## Runtime and failures4041Node 20+ and LibreOffice are required for the complete preview; use SOFFICE_BIN for42a nonstandard installation. Conversion runs with an isolated temporary profile,43not the user's open office session. The helper writes pending/failed verdicts,44requires fresh outputs, and never blesses an old PDF. Without LibreOffice it can45write the Office files but exits incomplete. Logs and receipts live in .harness.4647Restyling is implemented in the portable OOXML writer. After changing it, verify48the actual exported document in an office runtime and inspect rendered pages.