In a descending custom-list key a blank tied with values not in the list,
which come first, while it still went after the listed values, so the order
depended on the input. It now goes last.
Comparing two values not in the list changed descending custom-list keys too:
they no longer tied, so a later key could not order them. Only an ascending
key sorts them now; with a descending one they tie, as before.
Repeating a copy down a selection narrower than it writes the copy's width on
every row, so the 4,000,000-cell limit on a tiled paste now counts that area
rather than the selection's. Past it the copy is pasted once, as a tiled
paste over too large a selection already is.
Data Subtotal grouped each group's detail rows at level 1 and left the
subtotal rows at level 0, so outline level 1 still showed every
subtotal. Excel adds an outer group over all data and subtotal rows,
summarised by the grand total: details at level 2, subtotals at
level 1, the grand total at level 0. Subtotal now adds that group after
writing the grand total.
Two tests that read the old levels now expect Excel's: the summary-row
test shows level 2 to keep the subtotal visible, and the sheet-prefix
test expects a detail row at level 2.
Paste tiled the copy only over a selection whose height and width were
both multiples of the copy's. A row copied into a narrower selection
several rows tall (A1:B1 into A3:A6) was pasted once. Excel repeats it
down every row of the selection at the copy's width. A selection
narrower than the copy now tiles down when its height is a multiple of
the copy's, and one shorter than the copy tiles across when its width
is a multiple.
A custom-list sort key compared only each value's position in the list.
Every value outside the list got the same position, so the stable sort
left them in their original order. Excel sorts them after the listed
values in the usual order. Two unlisted values now compare as a sort
without a list does (matchCase included).
Measured with crates/engine/examples/bench.rs (perf/xtask-bench), 100k rows, M2 Pro:
enter.formulas 465 -> 420 ms (23829d8c: 375), xlsx.save 540 -> 488 ms (466).
- number_to_text: the round-up-to-1E+15 check (f29ac7d9e) formatted every number with
exact {:.14e} and parsed it back; formula printing calls it once per literal. Run it
only for magnitudes that can round up (>= 9.9999999999999e14). Same output; boundary
tests added.
- Expr clone/map, xlsx prefix_params: a binary node whose left operand is not a chain
no longer allocates a spine Vec (2aeb21d4d); map rewrites the operands in their boxes.
Expr::walk reserves room for a typical formula up front.
- grow_autofilter checks the sheet has an AutoFilter before looking up the cell.
- retained_bytes_against looks up the newer band's row once per row, not per cell.
- The journal measures an entry's JSON size with a counting writer instead of building
the text (a big paste's params are MBs).
The rest of the enter.formulas gap and all of edit.fanout's (~+12%) is Undo's byte
budget (72db972de, #1227): sizing each snapshot and freeing evicted ones, an intended
cost of bounded memory.
Co-authored-by: nihilist-narwhal <240798405+nihilist-narwhal@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
read_cache turned every pivot cache error into absence with
optional_xml(part).ok().flatten(), so a cache over the part size limit
dropped its PivotTable with no warning, and a malformed or missing cache
only left a generic "skipped part" line. Each case now adds a warning that
the PivotTable was kept as plain cells, and the workbook keeps opening
(the oversized part is refused before it inflates).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Found while testing crates/engine/src/cmd/data.rs:992 (split_delimited, used by text_to_columns)
Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
* calc: linear dependency extraction for range-operator chains (#2183)
precedents() handled a range operator with non-reference operands by recursing into both operands and then letting Expr::walk descend into them again, so a left-associative chain of k operands cost 2^k (a 60-operand INDEX(...):INDEX(...) chain would hang on open). It is now a hand-written collector that visits every node once, growing the per-sheet bounding boxes of the enclosing range operator as it goes. Past a depth (4096) or node (1,000,000) bound it marks the formula dynamic (always recalculated) instead of recursing further.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* calc: drop wall-clock timing from precedents tests (clippy)
std::time::Instant::now is a disallowed method (clippy.toml: traps on wasm).
The regression test only needs to finish; the old 2^k walk would never return.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* calc: bound precedents to 100 ms and box plain-reference range chains (#2183)
- range_operator_chain_precedents_are_linear times the direct precedents
call against the 100 ms bound in the issue.
- A Range node with two plain Ref operands (A1:B2:C3, which the parser
can't fold) now collects its bounding box like any other range node, so
an edit to C1 recalculates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* M0: reject negative fractional GCD and LCM arguments
Validate the original input before truncation. Add scalar and range regressions, including signed zero, positive fractions and zero-first LCM validation.
* M0: document negative-fraction GCD and LCM regression
Record tested edge-case behavior and update the parity revision history. Function counts and readiness estimates remain unchanged.
* M0: preserve GCD and LCM regression after math test extraction
Move the original negative-fraction regression into the existing extracted math tests. Scalar and range cases, zero-first validation, signed zero and positive truncation coverage are unchanged.
ACCRINTM returned #NUM! whenever issue >= settlement. Excel rejects only
an issue date after settlement: when the two dates are equal after
truncation to whole days (including distinct times on the same day) it
returns 0 in every basis and both date systems. Relax the guard to
issue > settle; zero rate, zero par and an invalid basis stay #NUM!.
The text box that holds the LaTeX source (for an equation Office Math cannot
hold, and as the fallback of one it can) was written at the size the typeset
equation is drawn at, so the much wider source overflowed its frame in Excel.
It now uses 11 pt, or less when the frame itself is smaller.
Fixes#4161
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>