Skip to content

[Sub-org] Fix Excel export hiding the row grouping gutter - #14624

Merged
garyhtou merged 1 commit into
hackclub:mainfrom
anishanne:fix-suborg-xlsx-outline-symbols
Aug 19, 2026
Merged

[Sub-org] Fix Excel export hiding the row grouping gutter#14624
garyhtou merged 1 commit into
hackclub:mainfrom
anishanne:fix-suborg-xlsx-outline-symbols

Conversation

@anishanne

Copy link
Copy Markdown
Contributor

Summary of the problem

The collapsible tree added in #14540 renders correctly in Google Sheets but the grouping gutter is missing entirely in Excel.

Unzipping an exported file shows the row grouping is present and correct:

<sheetFormatPr defaultRowHeight="15" outlineLevelRow="3"/>
<row r="3" spans="1:5" outlineLevel="1">

...but so is this:

<sheetView tabSelected="1" showOutlineSymbols="0" workbookViewId="0"/>

showOutlineSymbols="0" tells Excel to hide the outline gutter. Google Sheets ignores the attribute and draws the grouping anyway, which is why it only reproduced in Excel.

It comes from outline_settings(1, 0, 0, 0). write_xlsx guards that flag with a bare truthiness check:

# write_xlsx-1.12.3 worksheet.rb:3618 — "Turn outlines off"
attributes << ["showOutlineSymbols", 0] if @outline_on

0 is truthy in Ruby, so any number turns it on — passing 1 for visible (meaning "show them") is exactly what hides them. The same bug on line 4322 is why exports also carried a stray applyStyles="1" despite auto_style being 0.

Describe your changes

  • Pass false for visible and auto_style, the only value write_xlsx reads as off for those two. symbols_below/symbols_right use a correct == 0 check, so 0 stays right there.
  • Comment the inversion so nobody "cleans up" false back to 1.
  • Assert showOutlineSymbols is absent from the sheet in the existing tree spec, so this can't silently regress if the gem ever fixes its logic.

Verified against write_xlsx 1.12.3 directly — emitted XML after the change:

<sheetPr><outlinePr summaryBelow="0" summaryRight="0"/></sheetPr>
<sheetView tabSelected="1" workbookViewId="0"/>
<sheetFormatPr defaultRowHeight="15" outlineLevelRow="2"/>
<row r="3" spans="1:5" outlineLevel="1">

@anishanne
anishanne requested a review from a team August 15, 2026 07:15
@garyhtou
garyhtou added this pull request to the merge queue Aug 19, 2026
@garyhtou
garyhtou removed this pull request from the merge queue due to a manual request Aug 19, 2026
@garyhtou
garyhtou merged commit da8855d into hackclub:main Aug 19, 2026
20 checks passed
@garyhtou

Copy link
Copy Markdown
Member

force merged bc GH actions is down; so merge queue doesn't work

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