Skip to content

Honor include_formula_blanks for uncached formulas in wolfxl-core #5

@wolfiesch

Description

@wolfiesch

Source: Codex review on PR #4 (P2 finding on src/calamine_styled_backend.rs:907).

Symptom (legacy code): read_sheet_records() treats any present cell payload as a value even when include_formula_blanks=False is requested, so formulas with no cached value still emit blank/None records that callers expected to be skipped.

Why this is deferred from PR #4: The bug is in the legacy single-crate Python backend (src/calamine_styled_backend.rs), which PR #4 doesn't touch. The PR ships wolfxl-core (a fresh extraction without that path).

What needs to happen:

  1. When wolfxl-core::Sheet::load grows a with_options(...) builder to mirror the legacy keyword args (target: 0.5.0), gate the "include cell" decision on whether the source Data is Empty or a formula with no cached value, not just Empty.
  2. Decide whether to backport the fix to the legacy backend or let it die when the Python wrapper fully delegates to wolfxl-core.
  3. Add a parity test to tests/parity/ once the option is plumbed.

Acceptance: wolfxl.load_workbook(..., include_formula_blanks=False) skips uncached-formula cells the same way openpyxl's data_only=True skips cells with value is None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions