Skip to content

fix: preserve cached xlsx formula values#3375

Open
eteriall wants to merge 1 commit into
HKUDS:mainfrom
eteriall:fix/xlsx-formula-cache-fallback
Open

fix: preserve cached xlsx formula values#3375
eteriall wants to merge 1 commit into
HKUDS:mainfrom
eteriall:fix/xlsx-formula-cache-fallback

Conversation

@eteriall

@eteriall eteriall commented Jul 7, 2026

Copy link
Copy Markdown

Description

Improve XLSX extraction so formula cells preserve their indexable content.

Previously, formula cells could be indexed as the formula text itself (e.g. =SUM(A1:A10)) instead of the computed value when parsing spreadsheets. This meant documents containing formulas sometimes lost meaningful searchable content if the workbook values weren't handled correctly.

This change makes the extractor prefer cached calculated values when they are available, while falling back to the formula text when a workbook has not been recalculated and no cached value exists.

Related Issues

None.

Changes Made

  • Updated _extract_xlsx to read cached workbook values and formula text together.
  • Added regression coverage for cached-formula and no-cache XLSX cases.

Checklist

  • Changes tested locally
  • Code reviewed
  • Documentation updated (if necessary)
  • Unit tests added (if applicable)

Additional Notes

On same files - graph before fix
Screenshot 2026-07-07 at 22 29 10

Chat before fix
image

Graph after fix

Screenshot 2026-07-07 at 22 18 52

Chat after fix

image

@eteriall eteriall marked this pull request as ready for review July 7, 2026 20:24
@eteriall eteriall marked this pull request as draft July 7, 2026 20:24
@eteriall eteriall marked this pull request as ready for review July 7, 2026 20:37
@danielaskdd

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: abfdb5622c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

2 participants