Commit Graph
1983 Commits
Author SHA1 Message Date
CouchRivandClaude Opus 5.5 2a580f2902 Conditional formats: a style fill of "none" means no fill
`style: {fill: "none"}` (or "auto") went through the colour pass and came out as a solid
fill in the automatic colour. `home.fillColor` reads the same word as no fill, so the rule
style does too now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:34:14 -04:00
Brandon ThomasandClaude Opus 5.5 811a8a139a Fix-up: rustfmt the area-chart label condition after merging the chart PRs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:33:10 -04:00
CouchRivandClaude Opus 5.5 1a6979c948 Data validation: refuse an unknown type, operator or error style
data.validation took any `type`, `operator` or `errorStyle` and fell back
to a default: a typo such as `type: "lst"` saved an "any value" rule
(`type="none"`), which validates nothing, and an unknown operator became
`between`. Each is now an error that lists the accepted values; `any`
stays a type, and the operator aliases (`greaterThan`…) still work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:32:31 -04:00
Brandon Thomas 2df8dd6392 Merge pull request #618 from MarekSpodBiedry:issue-540 2026-10-12 23:29:58 -04:00
Brandon ThomasandClaude Opus 5.5 4941bf8da0 ROUNDUP keeps #NUM! past the number range; only toward-zero rounding returns 0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:29:56 -04:00
Brandon Thomas 59872eca3c Merge pull request #627 from MarekSpodBiedry:issue-531 (test fix) 2026-10-12 23:23:35 -04:00
Brandon ThomasandClaude Opus 5.5 7ea5cd3975 Test: the helper is new_session so a rebound session variable does not shadow it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:23:33 -04:00
Brandon Thomas e5071f382b Merge pull request #637 from MarekSpodBiedry:issue-518 2026-10-12 23:21:59 -04:00
Brandon Thomas 1fa38e583e Merge pull request #636 from MarekSpodBiedry:issue-519 2026-10-12 23:21:58 -04:00
Brandon Thomas 4d8af67d0e Merge pull request #635 from MarekSpodBiedry:issue-520 2026-10-12 23:21:57 -04:00
Brandon Thomas c3546f0c97 Merge pull request #634 from MarekSpodBiedry:issue-521 2026-10-12 23:21:56 -04:00
Brandon Thomas ff16e979cd Merge pull request #633 from MarekSpodBiedry:issue-522 2026-10-12 23:21:54 -04:00
Brandon Thomas a507761696 Merge pull request #631 from MarekSpodBiedry:issue-524 2026-10-12 23:21:53 -04:00
Brandon Thomas 3794892f28 Merge pull request #628 from MarekSpodBiedry:issue-527 2026-10-12 23:21:52 -04:00
Brandon Thomas 46ba36e896 Merge pull request #627 from MarekSpodBiedry:issue-531 2026-10-12 23:21:51 -04:00
Brandon Thomas 739c5b8545 Merge pull request #626 from MarekSpodBiedry:issue-532 2026-10-12 23:21:50 -04:00
Brandon Thomas 3f5b29a07e Merge pull request #625 from MarekSpodBiedry:issue-533 2026-10-12 23:21:49 -04:00
Brandon Thomas 487f736c8f Merge pull request #624 from MarekSpodBiedry:issue-534 2026-10-12 23:21:47 -04:00
Brandon Thomas b28a92baa4 Merge pull request #623 from MarekSpodBiedry:issue-535 2026-10-12 23:21:46 -04:00
Brandon Thomas f6252418d9 Merge pull request #622 from MarekSpodBiedry:issue-536 2026-10-12 23:21:45 -04:00
Brandon Thomas 8474233335 Merge pull request #621 from MarekSpodBiedry:issue-537 2026-10-12 23:21:44 -04:00
Brandon Thomas c8f249fc97 Merge pull request #620 from MarekSpodBiedry:issue-538 2026-10-12 23:21:42 -04:00
Brandon Thomas 9e3a83464f Merge pull request #619 from MarekSpodBiedry:issue-539 2026-10-12 23:21:41 -04:00
Brandon Thomas 09c719623b Merge pull request #618 from MarekSpodBiedry:issue-540 2026-10-12 23:21:40 -04:00
Brandon Thomas 6de925c1b6 Merge pull request #617 from MarekSpodBiedry:issue-541 2026-10-12 23:21:39 -04:00
Brandon Thomas 2f83a04521 Merge pull request #616 from MarekSpodBiedry:issue-542 2026-10-12 23:21:38 -04:00
Brandon Thomas e447fb8c90 Merge pull request #613 from MarekSpodBiedry:issue-545 2026-10-12 23:21:34 -04:00
Brandon Thomas db4fd82595 Merge pull request #612 from MarekSpodBiedry:issue-546 2026-10-12 23:21:33 -04:00
Brandon Thomas a85638ddd1 Merge pull request #611 from MarekSpodBiedry:issue-547 2026-10-12 23:21:32 -04:00
Brandon Thomas 4164ca557e Merge pull request #609 from MarekSpodBiedry:issue-552 2026-10-12 23:21:30 -04:00
Brandon Thomas 51b1b031d4 Merge pull request #608 from MarekSpodBiedry:issue-554 2026-10-12 23:21:29 -04:00
Brandon Thomas 28c5bf1b06 Merge pull request #607 from MarekSpodBiedry:issue-556 2026-10-12 23:21:28 -04:00
Brandon Thomas cd985b7d49 Merge pull request #606 from MarekSpodBiedry:issue-557 2026-10-12 23:21:27 -04:00
Brandon Thomas 8f99be0f2e Merge pull request #605 from MarekSpodBiedry:issue-558 2026-10-12 23:21:25 -04:00
Marco Arnulfo 522ede0fca Save an XLSX opened under an unknown extension back to its own file as XLSX (#878) 2026-10-13 05:14:30 +02:00
CouchRivandClaude Opus 5.5 180928c001 Data validation: a list typed without quotes is saved as a quoted list
data.validation {type: "list", formula1: "Open,In progress,Closed"}, which is
how Excel's Source box takes a list, worked inside GridCraft but was saved as
<formula1>Open,In progress,Closed</formula1>. In a file an inline list is a
string literal, "Open,In progress,Closed" (what Excel writes and what our own
reader expects); unquoted, formula1 reads as a formula of names.

- validation quotes such a source when the rule is created, doubling inner
  quotes, using the test list_items already used to tell a literal list from
  a reference or a name (now is_literal_list). A source typed with = (a
  formula), a reference, a name, a sheet-qualified range and an already quoted
  list are stored as before.
- list_items reads a quoted list as a string literal: "" inside stands for
  one quote, so an item with a quote reads back the same after the change and
  from a file.

Creating the rule is the one place that still knows whether the user typed =,
so the XLSX writer is left alone: it can't tell OFFSET(...) entered as a
formula from a literal list, and a rule read from a file is already quoted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:08:25 -04:00
CouchRivandClaude Opus 5.5 151a279da8 Conditional formats: hex colours in a custom style, no silently empty rules
home.conditionalFormat deserialized `style` straight into the model's
Style, so a programmatic caller had to write colours as {"Rgb": 16773836}:
"#FFF2CC", which format_range, colorScale and dataBar take, was refused
with a serde message naming internal types. A key the struct doesn't have
(`style: {preset: …}`, `fillColor`) was dropped, which saved a rule with an
empty format that matches and shows nothing. And a cellIs `value` already
written as a string literal ("\"Closed\"", as in the file and openpyxl)
was quoted again into the text "Closed" with its quotes, so it never
matched.

`style` colours (font, fill fg/bg, borders) may now be "#RRGGBB",
{theme, tint} or "auto", and `fill` may be a colour alone (a solid fill);
a fill colour with no pattern is solid. Unknown keys and a non-object
`style` are refused. A cellIs value that is one string literal is kept.
The model's own shape keeps working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:00:09 -04:00
CouchRivandClaude Opus 5.5 9a816f80f7 Format: Row Height and Column Width say pixels, and take points like Excel
home.rowHeight and home.columnWidth take pixels at 96 dpi, the model's unit
(header drags and the Row Height dialog send pixels), but their parameter docs
said points. An agent asking for a 30 pt row got `ht="22.5"` in the file, and
the range check accepted 500 while its message said "between 0 and 409 points".

- The params docs say pixels: `height: 20 (pixels) | points: 15`,
  `width: 64 (pixels) | chars: 8.43`, and `{width: 64 (pixels)}` for
  home.defaultWidth. Pixel values behave as before.
- home.rowHeight takes `points`, Excel's unit (Row Height dialog, `ht` in the
  file), as home.columnWidth already takes `chars`.
- Range errors give the limit in the unit passed: 546 pixels (409.5 points),
  409.5 points, 1800 pixels, 255 characters. `chars` is checked against 255,
  Excel's limit and the widest column a file holds (it went to 256.4 through
  the pixel limit).
- The model's size comments say pixels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:54:25 -04:00
CouchRivandClaude Opus 5.5 46b2fe2f7a Row, column and freeze commands act on the sheet they are given
view.freezePanes, home.rowHeight, home.columnWidth, the AutoFit, Hide and
Unhide row/column commands and home.defaultWidth always changed the active
sheet: a `sheet` parameter was silently ignored, so a programmatic caller
laying out a sheet that isn't active changed the wrong one, and `Sheet!`
prefixes on `rows`/`cols` were refused as "not a range".

They now take `sheet` (name or index) like the commands that already use
target_sheet, accept a `Sheet!` prefix on `rows`/`cols` (and on Freeze
Panes' `cell`, which was refused), and refuse a prefix that contradicts
`sheet`. The selection belongs to the active sheet, so another sheet needs
explicit lines or a cell. Freeze Top Row, Freeze First Column and Unfreeze
Panes take `sheet` too. Without `sheet`, nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:50:48 -04:00
CouchRivandClaude Opus 5.5 c186781d8b check: a boolean cached as 1/0 without t="b" matches and is counted apart
Business Central's "Open in Excel" exports write booleans as
<c><f>TRUE()</f><v>1</v></c> with no t="b", so the cached value reads back
as the number 1 and the calc oracle reported every such cell as a
`number → bool` mismatch. A cached 1 or 0 now matches GridCraft's TRUE or
FALSE, and the cells are counted apart (`boolAsNumber` in --json, a note in
the text report) so a real number/logical disagreement stays visible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:36:20 -04:00
Marco Arnulfo 9bb85ab9af Refuse to save to an unknown file extension instead of writing XLSX under it (fixes #878) 2026-10-13 04:34:03 +02:00
Marco Arnulfo 6dc9138a64 check: internal links and empty parts aren't package losses (part of #860) 2026-10-13 03:52:00 +02:00
neilcawse 95012e03b4 UI: a cut's text pastes again once the clipboard has held other text 2026-10-12 21:19:05 -04:00
Marco Arnulfo bf2923c4ba check: the package round trip reports relationship kinds the save lost (part of #860) 2026-10-13 03:04:37 +02:00
Marco Arnulfo dab4aa5e79 XLSX: write this-row structured references as [[#This Row],[Col]] (fixes #864)
[@Col] is only Excel's display shorthand. Written verbatim into cell formulas and calculatedColumnFormula, it made Excel repair the file and drop the tables.
2026-10-13 02:58:56 +02:00
nihilist-narwhal 34b39e2f3c Merge remote-tracking branch 'origin/main' into fix-function-name-arguments-m 2026-10-12 19:57:06 -05:00
nihilist-narwhal c930bf7872 Merge Across: keep only the first value of each row
Merge & Center and Merge Cells kept only the upper-left value, but
Merge Across left the other values of each row in place, hidden under
the merge and still counted: with 1 2 / 3 4 in A1:B2, SUM(A1:B2) stayed
10 after Merge Across, where Excel gives 4. Each row's merged area now
keeps only its first value, as the other merges do.
2026-10-12 19:52:59 -05:00
nihilist-narwhal 9da4e4cdf7 Manage Rules: don't index past the list after a delete
home.manageRules took the number of rules once, before deleting, so
{"delete":0,"moveUp":1} with two rules swapped past the end of the
shortened list and panicked (index out of bounds; the session's guard
kept the workbook). The count is now taken after each step.
2026-10-12 19:52:59 -05:00
nihilist-narwhal 6b6aa82be1 Long operator chains: evaluate them without the depth limit
A formula such as =A1+A2+…+A500 nests one level per operator, and the
evaluator recursed once per level, so past its depth limit (about 400
operators) the result was #CALC!. Excel allows such formulas up to its
8,192-character limit. Chains of arithmetic, comparison and & operators
are now folded in a loop.
2026-10-12 19:52:59 -05:00
nihilist-narwhal b5a82554a9 Fill Series: a falling growth series stops at its stop value
A growth series with a step below 1 stopped at once when given a stop
value, since the stop was only checked for rising series. It now bounds
the series in the direction it runs.
2026-10-12 19:52:59 -05:00