Fixed handling of string based formulas. (#153) #154
Merged
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.
The celltype
str
used to be handled as if it has the celltypeCellType.FORMULA
. Even if it only occurs as a result of a formula, it should still be handled as a string.This bug is fixed by using a boolean flag in the
StreamingCell.java
, that is true when the element is found in the excel file.Using the method
getCellTypeEnum()
now returnsCellType.STRING
forstr
as well. It now also checks if the the cell has the formulaType and will returnCellType.FORMULA
if the boolean flag is true.The method
getCachedFormulaResultTypeEnum()
will only return a cellType if the boolean flag is true and will also return CellType.String forstr
.Included is a unittest covering the bug.
Let me know if you need any more information, of if I should change something in the code.