Classic external-sheet reference continuations
Keep complete XTI references through save and reopen
The Classic BIFF8 ExternSheet record stores the existing typed worksheet-reference intervals as six-byte XTI entries, preceded by an unsigned sixteen-bit entry count
The writer uses a fixed physical-record buffer and preserves the existing ExternSheet and ordinary Continue byte layout, including an entry split across a physical boundary
The reader consumes every admitted segment instead of parsing only the first physical body, so a correctly written multi-record reference table can normally reopen with its complete typed identities and 3D formulas
Count admission and physical framing
| Boundary | Qualified behavior |
|---|---|
| At most 65535 entries | Check the full Integer count before narrowing it to the BIFF unsigned sixteen-bit field |
| 65536 or 65537 entries | Refuse explicitly before public output publication instead of wrapping the count to zero or one |
| BIFF8 physical output | Use at most 8224 payload bytes plus a four-byte record header |
| Logical input size | Require exactly two count bytes plus six bytes per declared entry, at most 393212 bytes |
| Tuple split across segments | Read successive little-endian words without adding a string continuation flag |
Checked Int64 planning includes every physical header and validates both Workbook and destination totals; all output owners resolve before the first reference record is appended
Input framing is checked across the complete segment collection before adding the declared typed entries; this does not add whole-workbook rollback after an unrelated failed Open
The legacy BIFF5 input uses its existing separate parser, while other record families retain their own continuation rules
Representative count and formula controls
Actual controls cover 1370 entries within the first physical record, 1371 entries spanning it, 10923 entries crossing the old aggregate length width, and the maximum 65535 entries across 48 physical records
The maximum fixture uses 362 worksheets and unique worksheet intervals rather than inventing 65535 worksheets
Normal reopen, complete typed counts, real 3D formula results, source destruction, formula edits and another save/reopen establish the positive path
Derived missing, extra, wrong-count, wrong-extent and short maximum-count segments provide parser refusal controls, alongside explicit oversized-count sentinel retention and valid retry
Fixed output buffer and resident reference model
The reference writer allocates a single buffer of at most 8228 bytes, without materializing another complete logical XTI field
The reader walks retained segments directly instead of constructing a temporary complete combined field; raw segments and the typed reference model remain resident
Reference-list rebuilding, owner keys, worksheet staging and other Workbook allocations still dominate the representative maximum-count whole-save measurement; fixed-buffer output is not a whole-save peak-reduction guarantee
Fixed-buffer output therefore does not imply a fixed whole-process memory ceiling, larger BIFF field widths or a new greater-than-2-GiB acceptance claim
Native evidence and source identity
Independent inspection decodes every tuple and the actual formula reference indices, and compares physical output with the preserved old writer's valid byte layout
Genuine small external-reference controls bind selected native formula and cache observations to their exact source generations; they do not claim a new native run for the 65535-entry fixture
Complete-stream identity and qualified record identity are recorded separately when the separately released Theme persistence changes unrelated Workbook globals
Remaining reference and wide-storage work
The adjacent supporting-link owner output separately governs external names and XCT/CRN cache children
Unknown owner semantics, other narrow metadata fields, broader source/model copying and the remaining drawing or compatibility work keep their explicit boundaries in compound-file storage