monitorjbl / excel-streaming-reader

An easy-to-use implementation of a streaming Excel reader using Apache POI
Apache License 2.0
953 stars 344 forks source link

Cell#getCachedFormulaResultTypeEnum returns incorrect value #153

Closed chkal closed 6 years ago

chkal commented 6 years ago

Hi!

First of all thank you very much for this awesome library. We are currently having trouble parsing very large Excel file with POI and came across your library. It is basically working great! Impressive work! So thank you.

Unfortunately we ran into one issue. We are having troubles parsing Excel files containing formulas. Our existing code basically checks the cell type and if it finds CellType.FORMULA, it will use cell.getCachedFormulaResultTypeEnum() to get the effective cell of of the cached formula result saved with the file.

Well, the issue seems to be, that cell.getCachedFormulaResultTypeEnum() also returns CellType.FORMULA instead of something like CellType.NUMERIC. As our code is recursive, we are running into a StackOverflowError.

I hope to find some time in the next days to have a deeper look at your code myself, but any help would be highly appreciated.

PS: I tried both 1.2.1 and the latest snapshots.

chkal commented 6 years ago

A quick update on this one. We just discovered, that this issue only occurs is the formula used results in a STRING. It works fine for NUMERIC.

I could contribute a failing test if this is helpful.

pjfanning commented 6 years ago

Can this be closed?

chkal commented 6 years ago

Yes, sorry, this was fixed with #153.