I’m sharing a set of sanitized, real-world engineering test cases involving DOCX/XLSX automation, OOXML fidelity, formula preservation, and artifact validation.
These are not general ChatGPT app questions. They are technical findings about reproducible document-generation failure modes and implementation patterns that may be useful to developers and for regression testing.
Key finding
A generated preview can look correct while the actual DOCX/XLSX/PDF artifact is structurally invalid, visually different from the master, or partially corrupted.
The most reliable pattern I found is:
When an existing professional document must be preserved, automate the master instead of recreating it.
DOCX pattern
Master DOCX → minimal OOXML mutation → real DOCX → structural validation → render comparison
XLSX pattern
Master XLSX → minimal OOXML mutation → preserve formulas/parts → structural validation → render comparison
Representative XLSX failure
An early implementation modified worksheet XML using raw string/regex manipulation.
Microsoft Excel then reported repair errors, including malformed worksheet XML and removed formula/calcChain records.
The reliable approach was:
- inspect the XLSX as an OOXML/ZIP package first
- separate editable literal cells, formula cells, and layout-only cells
- modify worksheet nodes through a real XML DOM parser
- never convert formula cells to literal values or vice versa
- preserve formula text and calcChain
- skip rewriting unchanged rich-text cells
- preserve untouched workbook parts byte-for-byte
Validation included:
- ZIP integrity
- XML well-formedness
- duplicate attribute checks
- relationship validation
- formula count/text validation
- calcChain membership
- merge-cell and print-setting preservation
- workbook open/render test
- visual comparison
In one representative master-data test, the generated workbook reached zero-pixel visual difference against the original render.
Representative DOCX failure
An early approach exported HTML/CSS content as a Word-compatible file.
The result lost pagination, layout, charts, logo positioning, headers/footers, and native Word structure.
The reliable solution was to use the original DOCX itself as the master OOXML template and modify only the variable content.
Other recurring cases
I also encountered and documented:
- Arabic RTL/bidi behavior in Word
- dynamic BOQ pagination and formula preservation
- UI-preview vs exported-XLSX/PDF inconsistencies
- PDF physical page-geometry mismatches
Reusable validation principle
Preview correctness is not artifact correctness.
A generated Office/PDF artifact should not be considered complete until the actual exported file has been structurally validated and rendered successfully.
I can provide sanitized representative bundles containing:
- original templates
- failed outputs
- corrected outputs
- exact prompts
- execution logs
- OOXML findings
- validation results
- visual comparison evidence
- pass/fail criteria
These cases come from real production-style engineering workflows rather than synthetic benchmark examples.