-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix #4550: Correct row/column transposition in xlsx tool #4622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alexhancock
merged 1 commit into
block:main
from
jalateras:fix-xlsx-row-column-transposition
Sep 15, 2025
Merged
Fix #4550: Correct row/column transposition in xlsx tool #4622
alexhancock
merged 1 commit into
block:main
from
jalateras:fix-xlsx-row-column-transposition
Sep 15, 2025
+78
−4
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
Fixed coordinate mapping issue where parse_cell_reference was returning (column, row) instead of (row, column), causing Excel cell references to be transposed. For example, A2 was incorrectly returning B1's value. The fix ensures parse_cell_reference returns (row, column) to match umya_spreadsheet's expected coordinate order, and updates parse_range accordingly. Added comprehensive tests to verify correct cell addressing behavior. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: jalateras <jima@comware.com.au>
426ee10 to
c193132
Compare
michaelneale
approved these changes
Sep 15, 2025
Collaborator
michaelneale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks fine to me - one of those "how did it ever work" moments, but I am sure I have heard complaints before.
alexhancock
approved these changes
Sep 15, 2025
michaelneale
added a commit
that referenced
this pull request
Sep 16, 2025
kita-sato
reviewed
Sep 17, 2025
Comment on lines
+376
to
+378
| // Test that A2 (row 2, column 1) returns the correct value | ||
| let a2_value = xlsx.get_cell_value(worksheet, 2, 1)?; | ||
| assert_eq!(a2_value.value, "Country", "A2 should contain 'Country'"); |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged
HikaruEgashira
pushed a commit
to HikaruEgashira/goose
that referenced
this pull request
Oct 3, 2025
…4622) Signed-off-by: jalateras <jima@comware.com.au> Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: HikaruEgashira <hikaru-egashira@c-fo.com>
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
parse_cell_referenceto return (row, column) instead of (column, row)Problem
The xlsx tool was incorrectly transposing row and column coordinates. When requesting cell A2 (row 2, column 1), it would return the value from B1 (row 1, column 2) instead. This was caused by
parse_cell_referencereturning coordinates in the wrong order compared to what the umya_spreadsheet library expects.Solution
parse_cell_referenceto return(row, col)instead of(col, row)to match umya_spreadsheet's coordinate expectationparse_rangeandget_rangefunctions to handle the corrected coordinate ordertest_coordinate_mapping: Verifies the coordinate system mappingtest_issue_4550_row_column_transposition: Specifically tests the reported issueTest Plan
Fixes #4550