format: an xlsx sheet can be wider than a spreadsheet will open - #93
Merged
Conversation
xlsx columns stopped at 64, with the reason "the width a person would actually look at". That describes a document somebody reads, and this tool writes fixtures somebody tests with - a ceiling belongs to the reader under test. At 64 there was no way to build a sheet that asks Excel about its own limit at all, while csv answered the same question about the same reader with 32768 and nothing compared the two. Measured 2026-09-08 with LibreOffice Calc 26.2.5.2 headless, on workbooks built outside this tool because this tool could not build them: 16384 columns come back whole, 16385 come back as 16384 with the last column dropped, exit 0 and not one word on either stream. After the change our own 16385 column workbook behaves identically, and hits the requested size to the byte. The encoder needed no change - column() counts letters in base 26, so it walks past XFD on its own. rows times columns still cannot pass 2 million cells, MinBytes is computed from a one by one sheet so it does not move, and a sheet of 64 columns or fewer is byte for byte what it was. The site is regenerated for the two lines that name the range. The guard asks every registered format that declares columns, so a third tabular format is covered on the day it arrives. It asks about the OFFER rather than building the file, because building one costs twelve megabytes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
xlsxoffered at most 64 columns. It now offers 32768, which is the ceilingcsvalready had for the same question about the same reader.Why the number
A ceiling belongs to the reader under test, not to what this tool finds
comfortable to write. The old reason was "the width a person would actually
look at" - which describes a document somebody reads, and this tool writes
fixtures somebody tests with. At 64 there was no way to build a sheet that
asks Excel about its own limit at all.
Measured 2026-09-08, LibreOffice Calc 26.2.5.2 headless, on workbooks built
outside this tool because this tool could not build them:
After the change, a 16385 column workbook from this tool behaves identically,
and hits the requested size to the byte. That silent loss is the thing a
tester needs a fixture for, and standing on both sides of the line is what a
boundary set is.
What did not change
column()counts letters in base 26, so it walks pastXFDonits own.
rowstimescolumnsstill cannot pass 2 million cells, so a sheet 16385wide holds up to 122 rows.
MinBytes, computed from a one by one sheet.column.
The site is regenerated for the two lines that name the range - the whole diff
there is
1 - 64 columnsbecoming1 - 32768 columns, and the same in Polish.Guard
TestAFormatWithColumnsReachesPastWhatASpreadsheetAcceptsasks everyregistered format that declares
columns, so a third tabular format iscovered on the day it arrives. The exception list is empty and is meant to
stay that way - a format belongs on it only when its own structure stops it
first.
It asks about the OFFER rather than building the file. That the file works was
measured rather than asserted on every run, because building one costs twelve
megabytes.
Proven by a mutation putting the ceiling back to 64.
Measured
Full suite green, gofmt and vet clean, preflight all twelve checks passed.
🤖 Generated with Claude Code