fix(xlsx): render requested screenshot range - #257
Open
Hanxcellent wants to merge 1 commit into
Open
Conversation
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.
Summary
/Sheet1/chart[1]Fixes #246
Root cause
CaptureClippedresolves an xlsx range through its two corner cells. The HTML renderer only emitted cells through the sheet's computed data/drawing extent, so when the requested lower-right corner was outside that grid it did not exist in the DOM. The crop union then contained only the surviving upper-left corner and collapsed to that cell, excluding the chart and the rest of the requested area.On current
main, the default full-sheet screenshot already renders this repro chart. The remaining reproducible defect is the--rangepath when the requested range extends past the generated grid.Validation
Repro workbook: populated cells in
A1:B13plus a floating chart starting atD1, then:officecli view repro.xlsx screenshot \ --range "Sheet1!A1:J20" \ -o range.pngObserved result:
mainA1; chart omittedA1:J20range and chartAdditional checks:
The build succeeds with the pre-existing nullable warning in
ExcelHandler.SheetShift.cs.