fix: handle missing r attribute in row and cell elements (#2961) #2962
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
This PR fixes issue #2961 where Excel files generated by tools
like DataGrip/IDEA fail to load due to missing
r
attributes on<row>
and<cell>
elements.Problem: When parsing Excel files without
r
attributes, thelibrary throws "Invalid row number in model" error because the
parser expects explicit row and cell references.
Solution:
currentAddress
tracking system toRowXform
classr
attributes based onsequential position
Changes:
logic and automatic
r
attribute generations: Added comprehensive test case
file from DataGrip
Test plan
Test Results:
Backward Compatibility Test:
regressions)
Manual Testing:
C2)
Related to source code (for typings update)
Core Implementation:
heet/row-xform.js#L86-L100 - Added automatic r attribute
generation
heet/row-xform.js#L64-L84 - Added address tracking logic
Test Coverage:
/issues/issue-2961-missing-r-attribute.spec.js - Verifies fix
works correctly
Closes #2961,#2075