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 change adds support for cells defined without a reference attribute.
According to this older issue for a different project, the
r
(reference) attribute is not required:box/spout#267
In this case, a cell's coordinates are to be determined based on location in the XML. I haven't been able to find documentation verifying that the reference attribute is actually optional but I have come across XLSX files that do not have the reference attribute.
Also included are an example file and test.
The PR does not address all parsing paths because significantly more changes were required. Specifically, when streaming rows, cells without an
r
attribute will still cause an error inRoo::Utils.extract_coordinate
.Other Information
It might be helpful to know the steps used to create the example file:
unzip test.xlsx -d emptydir
xl/worksheets/sheet1.xml
file so that allc
elements do not have anr
attribute. I also converted the cell definitions to be inline:<c s="0" t="inlineStr"><is><v>Test</v></is></c>
.xl/sharedStrings.xml
(since all values were changed to inline) and thedocProps
directory to minimize the contents.xlsx
extention