Skip to content

fix: a workbook with a chart sheet opens, the chart sheet named as one - #251

Merged
bencode merged 2 commits into
mainfrom
fix/chart-sheet
Oct 27, 2026
Merged

bencode merged 2 commits into
mainfrom
fix/chart-sheet

Conversation

@bencode

@bencode bencode commented Oct 27, 2026

Copy link
Copy Markdown
Owner

A workbook with a chart sheet, which Excel's Insert > Chart Sheet writes, could not be opened by the reader or the assistant. The reader also said "Only .xlsx files are supported" about a .xlsx.

The cause came in with #231. sheetPaths gave every sheet a details entry, chart sheets included. read-excel-file returns no data for a chart sheet, so withDetails ran rows.map on undefined and the whole workbook failed.

  • readSheetDetails reads each sheet's kind from its relationship type and marks a chart sheet chart: true, without parsing it. readSpreadsheet treats missing data as no rows, so no other sheet without cells can sink a workbook either.
  • The chart sheet keeps its tab. Its grid says "This sheet holds a chart, which the reader cannot show." The agent's sheet heading says the same, sheet_info marks it chart: true, and SKILL.md says what that means.
  • A workbook that fails to parse now says only "This workbook could not be read."
  • Charts placed on a worksheet are still not named (the issue's third point); that is left for later.

The first commit restores a reviewed follow-up to #235 that was pushed after it merged and so never reached main: the scroll ref typed as HTMLElement, and the row number width as $row-number-width.

A new test reads a workbook with a chart sheet; it fails on main with Cannot read properties of undefined (reading 'map').

Checked end to end with an openpyxl workbook holding a data sheet and a chart sheet:

  • Sales opens, and selecting a cell and moving with the arrow keys still works.
  • The "Revenue chart" tab shows the chart sentence.
  • The assistant's sheet_info returned chart: true, and its answer called the sheet a chart sheet.

Closes #243

@bencode
bencode merged commit ad4bc66 into main Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant