Archibald312 teaches Mike to read spreadsheets, cell by cell

Excel and CSV files are now first-class documents - and when the AI cites one, it points to the exact cell.

discoverysearch

Archibald312's fork pulls spreadsheets into the same ingestion path as PDFs and Word files, so an Excel workbook or a CSV becomes something the AI can read and reason over directly. Crucially, it stores the value you'd actually see in the cell - formatted dates and numbers, not raw machine figures - along with where it sits and any underlying formula.

The standout is how it cites. Where the base codebase points you to a page range in a PDF or a paragraph in a document, this fork points to a specific cell on a specific sheet. Ask a question about a damages model or a payment schedule and the answer comes back with a coordinate you can click straight to and verify.

So what Worth a look for anyone wrangling financial exhibits, schedules, or data-heavy discovery, where "which number, exactly?" is the whole game.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from Archibald312/GordonOSS, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
2ac696ce Phase 5: Excel I/O - xlsx/xls/xlsm/csv ingestion + per-cell citations + XlsxView Scott Rozen 2026-05-15 ↗ GitHub
commit body
Spreadsheets are now first-class documents in GordonOSS.

## Backend
- Born `backend/src/lib/extractors/` per CLAUDE.md deterministic-first rule:
  `xlsx.ts` (ExcelJS, numfmt-formatted values, formula preservation, merged
  ranges) and `csv.ts` (RFC 4180 handwritten parser) - both pure/side-effect-free
  with 10 new unit tests.
- `documents.ts`: accept xlsx/xls/xlsm/csv; xls→xlsx normalization via
  libreoffice-convert; spreadsheets skip PDF conversion; structure tree
  lists sheet names.
- `convert.ts`: `xlsToXlsx()` helper.
- `documentReading.ts`: xlsx/csv branch calls extractor+flattener; citation
  reminder appended with spreadsheet cell-address guidance when file_type is a
  spreadsheet.
- `chatTools.ts`: system prompt extended with spreadsheet citation form;
  `normalizeCitation` preserves `Sheet!Cell` strings in the `page` field.
- `models.ts`: Gemma 4 31B added as default (higher free-tier quota than
  Gemini Flash); `providerForModel` routes `gemma-*` through Gemini adapter.
- Removed `freeTierGuard.ts` and its test - guard was blocking real documents
  from free-tier Gemini. Data-privacy tier guard redesign deferred to CLAUDE.md
  "Future capabilities".
- Chat error routes now surface real `err.message` in dev instead of generic
  "Stream error".

## Frontend
- `XlsxView.tsx` (new): sheet tabs, sticky column-letter header + row-number
  gutter, read-only formula bar (cell address chip + formula/value), numfmt-
  formatted display, click-to-select, citation jump + 2.5s yellow highlight.
- `DocPanel.tsx`, `DocViewModal.tsx`, chat `page.tsx`: route xlsx/csv to
  XlsxView ahead of DocxView/DocView.
- `types.ts`: `CitationQuote.cellRef`; `expandCitationToEntries` routes
  Sheet!Cell strings; `formatCitationPage` shows cell ref verbatim.
- `exportToExcel.ts`: per-cell ExcelJS comments containing citation list.
- Upload `accept` extended to xlsx/xls/xlsm/csv in all five upload sites.
- `ModelToggle.tsx`: Gemma 4 31B added at top of Google group; set as default.
- `DocxView.tsx`: childNodes crash demoted to warn + inline fallback.
- `CLAUDE.md`: editable formula bar, generate_xlsx tool, data-privacy tier
  guard added as future capabilities.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-424.md from inside the repo you want the changes in.

⬇ Download capture-thread-424.md