Skip to content

Slicer: find a named table on any sheet - #1329

Merged
aiongg merged 1 commit into
storytold:mainfrom
dev-exe:fix/slicer-table-any-sheet
Oct 22, 2026
Merged

aiongg merged 1 commit into
storytold:mainfrom
dev-exe:fix/slicer-table-any-sheet

Conversation

@dev-exe

@dev-exe dev-exe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Problem

insert.slicer and table.insertSlicer only looked for the named table on the active sheet. When another sheet was open, adding a slicer to a table by name failed with "Select a cell inside a table first, or pass table", even though table was passed.

Fix

  • A table named in table is now found on any sheet, the same way other table commands find tables.
  • The slicer goes on that table's sheet.
  • at is checked against that sheet, so "Sheet1!G2" works.
  • A name that matches no table now gives "no table named X".
  • Without table, nothing changes.

Tests

A new test, slicer_finds_a_named_table_on_another_sheet, makes a table on Sheet1, opens another sheet, and adds a slicer by the table's name. It checks the slicer lands on Sheet1 and filters the table. It fails on main and passes here.

cargo fmt --check, cargo clippy -p gridcraft-engine --all-targets -- -D warnings and cargo test -p gridcraft-engine all pass.

Other open PRs

🤖 Generated with Claude Code

insert.slicer and table.insertSlicer looked for the table named by `table` only on the active
sheet. With another sheet active, the call failed with "Select a cell inside a table first, or
pass `table`" although `table` was passed. Other table commands find a table by name in the
whole workbook (Workbook::table).

The named table is now found on any sheet, and the slicer goes on that table's sheet. `at` is
read on that sheet, so "Sheet1!G2" names the table's own sheet. A name that matches no table
gives "no table named `X`".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aiongg
aiongg merged commit 38fb979 into storytold:main Oct 22, 2026
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