Commit Graph
17 Commits
Author SHA1 Message Date
Harrison BoothandClaude Opus 5.5 cdb3c163ec ft-3ir.2.1: keep PivotTables on a data connection or the Data Model on XLSX save
A PivotTable whose cache has cacheSource type="external" (a data
connection, or the workbook's Data Model: OLAP caches with saveData="0"
and no records) was read as unsupported and dropped on save with its
cache, and the Data Model part (xl/model/item.data) was never kept.

Such PivotTables are now reported by read_pivots and kept by the
pass-through layer like those on another workbook: table, cache and
records parts unchanged, original cacheId, style ids renumbered. The
connection is looked up in xl/connections.xml to tell the Data Model
from a plain connection. The Data Model part is kept byte for byte
whenever the workbook's connections are kept. A cache on a connection is
kept only with the connections, one on the model only with the model;
otherwise its PivotTable is left as plain cells with one warning.

Checked in Excel with synthetic workbooks: Excel needs the table, cache,
connections.xml and the hidden _xlcn. name of a worksheet connection to
open the file, and item.data to refresh it; the x15:dataModel workbook
extension is not needed and is not kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:27:02 -05:00
Harrison BoothandClaude Opus 5.5 8732325b58 ft-121.1.25: keep PivotTables whose source is in another workbook on XLSX save
A PivotTable whose cache's worksheetSource has an r:id to an
externalLinkPath relationship (range or defined name in another
workbook) was read as a model pivot with an unresolvable source, and the
writer then skipped it silently: the table, cache definition, records,
the cache's link and the workbook's pivotCache entry were all lost.

Such PivotTables are now reported by read_pivots instead of modelled and
kept by the pass-through layer: the table parts with their sheet, the
cache and records with the workbook and its original cacheId. Written
pivot caches skip the kept ids, a cache no kept table uses is dropped,
and the kept parts' dxfId and numFmtId references are renumbered to the
rewritten styles part (Excel refuses to open the file otherwise).
gridcraft-cli check counts kept PivotTables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:42:49 -05:00
Brandon Thomas 9972a75f10 Merge main into #824
# Conflicts:
#	crates/engine/src/cmd/file.rs
#	crates/engine/src/tests.rs
#	crates/xlsx/src/tests/passthrough_tests.rs
2026-10-13 00:53:41 -04:00
Brandon Thomas 2174db2006 Merge main into #871
# Conflicts:
#	docs/cli.md
2026-10-13 00:09:07 -04:00
Brandon Thomas f0e158f089 Merge pull request #882 from CouchRiv:fix/check-bool-cached-as-number 2026-10-12 23:50:14 -04:00
Brandon ThomasandClaude Opus 5.5 284c33a0f5 Fix-up: rustfmt check.rs after merging the check PRs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:37:40 -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 6dc9138a64 check: internal links and empty parts aren't package losses (part of #860) 2026-10-13 03:52:00 +02: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 5406fc5629 XLSX: Save As into another folder keeps links on the same workbook (fixes #801)
Excel stores the path of a linked workbook relative to the file that uses it, and rewrites it when the file is saved into another folder. The path was kept as text, so after Save As it named a file next to the new copy: a missing link, or another workbook with the same name. Relative externalLinkPath targets are now resolved against the folder the workbook was read from and written relative to the folder it is saved into (absolute when there is no relative path, on another drive).
2026-10-12 22:55:53 +02:00
MarekSpodBiedry 9a698aa1ff Make gridcraft-cli check compare conditional-format rule contents, not just their count (#559) 2026-10-12 08:36:53 +02:00
neilcawseandClaude Opus 5.5 f7bc97b378 CLI: check subcommand - cached-value calc oracle and XLSX round-trip fidelity on any corpus
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:39:30 -04:00
MarekSpodBiedry fe162f8f23 Report an error when file commands get no file in MCP and CLI (#135) 2026-10-10 19:05:56 +02:00
Brandon Thomas ea9d4c6b32 Merge origin/main into codex/xlsb-import 2026-10-10 12:04:33 -04:00
agammann 06cb377c54 Fix escaped quotes in Text to Columns 2026-10-09 22:47:38 -07:00
harrisonoconnorhover c51e51fe7b #92: import XLSB worksheet data and saved formula results 2026-10-09 22:19:36 -04:00
Brandon ThomasandClaude Opus 5.5 488e12de31 Rename SheetCraft to GridCraft everywhere (crates, apps, bundle ids, packaging, docs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:39:08 -04:00