Skip to content

feat(write): sheet layout — header style, frozen panes, auto-filter, merged cells - #91

Merged
vaceslav merged 10 commits into
mainfrom
feat/write-layout
Oct 4, 2026
Merged

vaceslav merged 10 commits into
mainfrom
feat/write-layout

Conversation

@vaceslav

@vaceslav vaceslav commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Part 2 of the styled/columnar export (spec docs/superpowers/specs/2026-10-04-styled-columnar-export-design.md §2). Closes #87. Part of #67.

  • SheetOptions on BeginSheet: a header style, frozen rows and columns, an auto-filter on the header row through the last row written. Csv ignores it.
  • writer.Merge(rows, columns): the next cell is the top-left of a merged range. Covered positions are skipped automatically and written by the writer, also when a row ends early. Overlaps, ranges past the columns, a merge no cell followed and ranges still open at the end of a sheet are refused.
  • xlsx: sheetViews pane, autoFilter + _xlnm._FilterDatabase, mergeCells (≤ 65,536 per sheet); covered cells of a styled range carry its style, so Excel draws a merged range's border around the whole range.
  • ods: freeze in settings.xml, filters as table:database-ranges, spans + covered cells; a run of empty cells is one repeated cell.
  • A sheet without merges pays one null check per cell, nothing allocated.
  • Verified with OpenXmlValidator, our import, and LibreOffice (filters, merges and merged fills survive conversion both ways; a laid-out data + legend workbook opens and reads back). Frozen panes are checked structurally only — headless LibreOffice keeps no view state.

…d positions skipped and written by the writer; csv
…ells; merge tests for early-ending rows, fills; docs; one null check per cell
…ibreOffice reads the view settings; resave interop test

The view-settings set's name is a QName, and LibreOffice ignores the set when its ooo prefix is undeclared. LibreOffice.Resave opens a file through a macro (a document with a view) and stores it as ods, so the tests see which panes it understood, for ods and xlsx input.
@vaceslav
vaceslav merged commit c158848 into main Oct 4, 2026
9 checks passed
@vaceslav
vaceslav deleted the feat/write-layout branch October 4, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write: sheet layout — merged cells, freeze panes, auto-filter, header style, column limit

1 participant