Skip to content

feat(xlsx): optionally preserve displayed Excel error cells - #4834

Draft
Afloat16 wants to merge 1 commit into
Unstructured-IO:mainfrom
Afloat16:Afloat16/xlsx-error-cell-preservation-20261121
Draft

Afloat16 wants to merge 1 commit into
Unstructured-IO:mainfrom
Afloat16:Afloat16/xlsx-error-cell-preservation-20261121

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Pandas converts Excel error cells to missing values before partitioning. That hides displayed #DIV/0!, #REF! and related results, changes table boundaries, and can discard a sheet containing only errors.

Add include_cell_errors=True for XLSX documents. A reader override preserves the displayed error token before Pandas dtype inference, covering both whole-sheet and compacted subtable reads. Blank, numeric, boolean and cached-formula handling stay with the existing reader. The default remains unchanged, and this does not recalculate formulas or change legacy XLS handling.

Validation

All 17 new cases fail on main. The new tests, workbook-reader, NA-token and existing XLSX suites pass: 191 passed, two resource-intensive cases deselected. Existing default error-cell expectations still pass. Whole-repository Ruff 0.15.10 lint and format checks pass. Full repository tests remain pending, so this is a draft.

If the worksheet-lifetime PR merges first, pass this option into its direct open_excel_workbook call when rebasing.

This branch has not been deployed

No deployments
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.

1 participant