Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: extract tables from DOCX text boxes#4416

Open
yaodong-shen wants to merge 3 commits into
Unstructured-IO:mainUnstructured-IO/unstructured:mainfrom
yaodong-shen:yaodong-shen/docx-textbox-tablesyaodong-shen/unstructured:yaodong-shen/docx-textbox-tablesCopy head branch name to clipboard
Open

fix: extract tables from DOCX text boxes#4416
yaodong-shen wants to merge 3 commits into
Unstructured-IO:mainUnstructured-IO/unstructured:mainfrom
yaodong-shen:yaodong-shen/docx-textbox-tablesyaodong-shen/unstructured:yaodong-shen/docx-textbox-tablesCopy head branch name to clipboard

Conversation

@yaodong-shen

@yaodong-shen yaodong-shen commented Jul 21, 2026

Copy link
Copy Markdown

Summary

  • extract DOCX tables stored inside w:txbxContent, including Pages exports
  • select a single active mc:AlternateContent branch to avoid duplicate Choice/Fallback tables
  • preserve the existing behavior that ignores ordinary shape text
  • add a synthetic regression test and update the changelog/version

Reproduction

The attachment from #3875 returned no elements on current main. With this change it returns one Table containing all six rows and structured HTML.

Testing

  • make test-extra-docx (102 passed)
  • .venv/bin/pytest test_unstructured/partition/test_docx.py -q (79 passed)
  • make check
  • .venv/bin/mypy unstructured/partition/docx.py
  • end-to-end validation with copied_from_numbers.docx

Closes #3875

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread unstructured/partition/docx.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread unstructured/partition/docx.py

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Shadow auto-approve: would auto-approve. Adds extraction of DOCX tables from text boxes and handles AlternateContent branches to avoid duplicates. Bounded, tested fix for missing table content.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug/word document with a single table in it cannot be extracted by unstructured

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.