Skip to content

Add freeze panes to worksheet views - #89

Merged
borgar merged 3 commits into
borgar:masterfrom
flother:freeze-panes
Aug 21, 2026
Merged

Add freeze panes to worksheet views#89
borgar merged 3 commits into
borgar:masterfrom
flother:freeze-panes

Conversation

@flother

@flother flother commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Support for frozen panes (aka freeze panes) was added to the JSF format in jsfkit/types#59. This adds support for exporting freeze panes from .xlsx files to JSF-formatted JSON.

Excel allows a worksheet view to be divided into panes: two panes stacked vertically, two panes stacked horizontally, or four panes that divide the sheet into quadrants. Excel supports splitting or freezing panes, but only the latter is supported in JSF. This is deliberate, because split panes is rarely used these days and likely only kept for backwards compatibility.

Frozen panes lock top rows and/or left-most columns in place while the rest of the sheet scrolls beneath them. Dividers can't be dragged to resize panes and the frozen regions can't be scrolled. Pane sizes are measured in row and/or column offsets.

xlsx-convert will now change OOXML like this:

<sheetView tabSelected="1" workbookViewId="0">
  <pane state="frozen" xSplit="1" ySplit="2" topLeftCell="C1" activePane="bottomRight"/>
</sheetView>

To JSF like this:

{
  // WorksheetView object
  // ...
  "panes": {
    "type": "frozen",
    "columns": "1",
    "rows": "2",
    "firstVisibleCell": "C1",
    "activePane": "bottomEnd"
  }
}

This requires a new release of the jsfkit/types package with the changes from jsfkit/types#59. Until then the typecheck CI job will fail.

Support for frozen panes (aka freeze panes) was added to the JSF format
in jsfkit/types#59. This adds support for
exporting freeze panes from .xlsx files to JSF-formatted JSON.

Excel allows a worksheet view to be divided into panes: two panes
stacked vertically, two panes stacked horizontally, or four panes that
divide the sheet into quadrants. Excel supports splitting or freezing
panes, but only the latter is supported in JSF. This is deliberate,
because split panes is rarely used these days and likely only kept for
backwards compatibility.

Frozen panes lock top rows and/or left-most columns in place while the
rest of the sheet scrolls beneath them. Dividers can't be dragged to
resize panes and the frozen regions can't be scrolled. Pane sizes are
measured in row and/or column offsets.

xlsx-convert will now change OOXML like this:

    <sheetView tabSelected="1" workbookViewId="0">
      <pane state="frozen" xSplit="1" ySplit="2" topLeftCell="C1" activePane="bottomRight"/>
    </sheetView>

To JSF like this:

    {
      // WorksheetView object
      // ...
      "panes": {
        "type": "frozen",
        "columns": "1",
        "rows": "2",
        "firstVisibleCell": "C1",
        "activePane": "bottomEnd"
      }
    }
borgar pushed a commit that referenced this pull request Aug 19, 2026
A handful of tests that check `<sheetView>` cell/range selections are
converted correctly. I added these while working on frozen panes (#89)
but pulled them out into a seperate change.
Brings in the type changes required for frozen panes.
@flother

flother commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

This requires a new release of the jsfkit/types package with the changes from jsfkit/types#59. Until then the typecheck CI job will fail

New version released and pulled in in cc45b69.

@flother
flother marked this pull request as ready for review August 21, 2026 13:27
@borgar
borgar merged commit 0c81d1f into borgar:master Aug 21, 2026
3 checks passed
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.

2 participants