Skip to content

DOCX has tables but they didn't parse

The DOCX uploaded fine, parseStatus = PARSED, but some line items have empty valueCurrent or rows are obviously missing.

What this means

mammoth extracted the tables but the layout had quirks that broke the cell-mapping:

  • Merged cells across rows or columns
  • A "footer" row with non-numeric content (e.g. notes references) where the parser expected an amount
  • Multi-column headers that confuse the column-to-statement mapping
  • Tables nested inside a frame or a text box

Diagnose

sql
SELECT statement, label, value_current, value_prior, source_page, source_line
  FROM xbrl_line_items
  WHERE xbrl_filing_id = '<filingId>'
  ORDER BY statement, source_line;

Spot-check the rows. Empty valueCurrent on rows that look like real line items (e.g. Cash and Cash Equivalents) → parser missed the value. Compare against the source DOCX at the referenced page + line.

Fix

  • Quick fix: edit the affected line items in the Mappings tab. Click into the row; correct the value; confirm. Manual edits are audited.
  • Better fix: ask the client to provide a cleaner DOCX (unmerged cells, no nested tables). Re-upload; re-confirm mappings.
  • Cross-product: if the client also has an FS engagement for the same period, use Pull from FS engagement — the FS module's statement JSON is structurally clean by construction.

Internal use only — BreezyCorp