Repository navigation
feat(knowledge): parse SpreadsheetML xls exports - #2332
Open
xyi74976-del wants to merge 1 commit into
Open
xyi74976-del wants to merge 1 commit into
xyi74976-del wants to merge 1 commit into
Conversation
9 of 12 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1879. Some business systems export Excel 2003 SpreadsheetML XML under a
.xlsfilename. The existing importer passes it toxlrd, so the indexing job fails with “Expected BOF record” even though the data is a valid workbook.Recognize XML exports and extract their cached cell values through a separate, bounded parser. Binary BIFF
.xlsfiles retain thexlrdpath. The same extractor serves knowledge preview and indexing.ss:IndexwithLeftCell/TopCelland horizontal merge gaps before checking final coordinates.No new dependencies, schema changes, upload extension, or configuration knob.
Target branch
developmainType of change
Test plan
XLRDErrorthrough pristinedevelop@6ae53c2; they cover five encodings, sparse/multiple sheets, cached formulas/rich text and merge gaps.make all PYTEST_JOBS=2: 5157 passed, 34 skipped, Ruff and mypy passed.git diff --checkpassed. No native Windows or live embedding-provider test was run; remote CI is separate.This is text extraction, not full spreadsheet rendering/XSD validation. Number/DateTime text is retained without display-format conversion. Blank rows/sheets and uncached formulas contribute no text. Merged ranges are not fully validated or expanded vertically. XML extraction is additionally limited to 16 MiB, 500,000 elements and depth 64; the normal upload limit also applies.
Actual dashboard comparison
The same synthetic
.xlswas uploaded through the actual Octop HTTP endpoint in two isolated temporary instances. Authentication, background indexing, SQLite, preview API and React dashboard are real; embedding readiness/vectors and the unused harness are test fixtures. The before case substitutes only pristineparse.pyat the existing jobs/service boundary.Before: failed, zero chunks, XLRD BOF error.
After: ready, one chunk. Preview and actual SQLite vector search retain
订单 0001234567890123456789and12.25; original bytes are unchanged.Recorded job states and extracted/retrieved values
Checklist
CHANGELOG.mdand format/limit documentationAI assistance: Codex for investigation, implementation, tests, integration/browser evidence, independent review and this description.