Skip to content

Import worksheet data and cached results from XLSB workbooks - #101

Merged
h-a-n-a-s-h-i merged 3 commits into
storytold:mainfrom
harrisonoconnorhover:codex/xlsb-import
Oct 10, 2026
Merged

h-a-n-a-s-h-i merged 3 commits into
storytold:mainfrom
harrisonoconnorhover:codex/xlsb-import

Conversation

@harrisonoconnorhover

Copy link
Copy Markdown
Contributor

Addresses #92 with an initial XLSB worksheet-data import.

XLSB files can be selected or dropped into the app and opened through the CLI/MCP. The reader preserves worksheet names/visibility, scalar values, shared/inline/rich text, cached formula results (including errors), merged ranges and the workbook date system. It resolves package relationships and accepts both documented and commonly used binary-workbook content types. Original Rust fixtures cover malformed/truncated records, limits and extension blocks; no runtime dependencies or vendor fixtures were added.

This is data-only import: formulas become their last saved results, source formatting is omitted, and dates/currencies/percentages may display as raw numbers. Charts, images, macros and other workbook features are not imported. These limits appear in an app warning, returned warnings and CLI stderr. Imported workbooks have no save target; ordinary Save requests a new XLSX destination even if the source had a misleading .xlsx extension. Explicit XLSB output is rejected.

Validation: 113 reader/engine/CLI tests, eight UI checks (including a temporary offscreen import render), and seven CLI end-to-end checks pass. Native compile, WASM, formatting/assets/layers and diff checks pass. An independently generated original fixture was also accepted by LibreOffice, with values and hidden-sheet state verified; native Excel was not available. Full cargo xtask ci stops at the unchanged core/src/date.rs:100 Clippy warning, and scoped Clippy reports only the unchanged xlsx/src/sheet_read.rs:146 warning. No suppressions added.

Keep #92 open for formula/style fidelity and XLSB writing; this provides initial data access rather than full binary-workbook compatibility.

harrisonoconnorhover and others added 3 commits October 9, 2026 22:19
…tail

PhRun is 10 bytes per [MS-XLSB] 2.5.103 (four u16 fields plus a 16-bit
phType/alcH/unused1 word), so the documented size is kept; since the
RichStr ends its record and phonetic data is not imported, bytes after
the documented runs are now ignored instead of rejecting the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 09b1ac8 into storytold:main Oct 10, 2026
h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 10, 2026
#101/#100 added tests that name temp dirs with SystemTime::now(); #125's
disallowed-methods lint (wasm has no clock) landed alongside them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@echelon

echelon commented Oct 10, 2026

Copy link
Copy Markdown
Member

Merged into main — thank you, the XLSB reader is impressively defensive. Review fix-ups pushed to your branch: fixed the "methxlsb" typo in main.rs; confirmed against [MS-XLSB] 2.5.103 that PhRun is 10 bytes as you had it, and made rich_string tolerate trailing padding after the documented runs (new test).

If you haven't already, please come join us on Discord: https://discord.gg/artcraft — we'd love to have you around.

h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 11, 2026
GridCraft imports XLSB (#101) and ODS (#100) files, but the Linux desktop
entry, shared-mime-info file and AppStream metadata, and the Windows
"Open with" list only named .xlsx, .xlsm, .csv and .tsv. Add the two
import formats there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
neilcawse added a commit to neilcawse/gridcraft that referenced this pull request Oct 12, 2026
GridCraft imports XLSB (storytold#101) and ODS (storytold#100) files, and storytold#321 added both
to the Linux and Windows "Open with" lists, but the macOS Info.plist
still declared only .xlsx, .xlsm, .csv and .tsv, so Finder's Open With
didn't offer GridCraft for them. Add two CFBundleDocumentTypes entries
(Editor, rank Alternate) with the UTIs macOS reports for these files,
plus an imported UTI for .xlsb like the .xlsm one. A test now checks
that the macOS and Windows packaging offer the same file types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
neilcawse added a commit to neilcawse/gridcraft that referenced this pull request Oct 13, 2026
GridCraft imports XLSB (storytold#101) and ODS (storytold#100) files, and storytold#321 added both
to the Linux and Windows "Open with" lists, but the macOS Info.plist
still declared only .xlsx, .xlsm, .csv and .tsv, so Finder's Open With
didn't offer GridCraft for them. Add two CFBundleDocumentTypes entries
(Editor, rank Alternate) with the UTIs macOS reports for these files,
plus an imported UTI for .xlsb like the .xlsm one. A test now checks
that the macOS and Windows packaging offer the same file types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants