Skip to content

Preserve spreadsheet error codes in cell values - #258

Draft
carl-distill wants to merge 1 commit into
dimastbk:masterfrom
carl-distill:carl/preserve-error-cells
Draft

carl-distill wants to merge 1 commit into
dimastbk:masterfrom
carl-distill:carl/preserve-error-cells

Conversation

@carl-distill

Copy link
Copy Markdown

Codex (GPT-6):

Error cells currently become empty strings in both iter_rows() and to_python(), making a spreadsheet error indistinguishable from a blank cell. This change converts the underlying Calamine error to its display string, preserving values such as #N/A and #DIV/0!. Blank cells remain empty strings.

Synthetic XLS and XLSX fixtures cover the seven common error variants, BIFF's GettingData variant (displayed by Calamine as #DATA!), a blank cell and a literal #N/A through both APIs. The fixtures contain no external or private workbook data. Error values remain ordinary Python strings, so an error and a literal string with identical spelling are still indistinguishable.

Both regression cases fail against an independently built unpatched 0.9.1 wheel. The patched wheel passes the full upstream test suite: 57 passed, 1 expected failure, on CPython 3.14.6/macOS arm64 with Rust 1.96.0 and locked Cargo inputs. Clippy and Ruff pass; independent review reproduced the before/after outputs. Other platforms were not tested. cargo fmt --check could not start because the local formatter lacked its required driver library; the full pre-commit/mypy/stubtest checks remain unrun.

Addresses issue #105.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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