DOCX Extractor
AI-generatedSummary
Extracts structured text and metadata from a DOCX file into JSON, detecting headings, lists, tables, and styles.
Inputs
- binaryProperty (required) — The binary property name containing the DOCX file (defaults to 'data').
- outputFormat — Organizes extracted content as 'hierarchical' (sections/subsections) or 'flat' (list of elements).
- options.includeMetadata — Includes document metadata (title, author, dates, word count, paragraph count, character count).
- options.includeStyles — Includes style information (bold, italic, underline) for each element.
- options.tableFormat — Formats tables as 'array' (rows of cells) or 'objects' (key-value rows based on header detection).
Output shape
A JSON object containing metadata, structured content (sections or flat list), tables, and statistics.
Returns metadata (title, author, dates) and statistics (word count, element counts) by default. Tables are included separately if present. Supports error envelopes for failed extractions.
Examples
Example 1: Extracting a report with headings and tables into a flat list.
Use 'flat' output format, include metadata, include styles, and table format 'array'.
Example 2: Extracting a document with hierarchical sections for navigation.
Use 'hierarchical' output format, include metadata and styles, table format 'objects'.
Example 3: Extracting a document focused on table data.
Use 'flat' output, include metadata, include styles, and table format 'objects'.