mjul / docjure

Read and write Office documents from Clojure
MIT License
622 stars 129 forks source link

Add support for text formula cells. - Prevent "Cannot get a numeric value from a text formula cell" #31

Closed rakhra closed 9 years ago

rakhra commented 9 years ago

Evaluate formula cell prior to date formatted check to prevent "Cannot get a numeric value from a text formula cell" exception.

The modification is in speadsheet.clj. The formulae integration test has been updated to check for text formulas.

The read-cell multi method for Cell/CELL_TYPE_FORMULA has been modified to first evaluate the formula, then inspect the type of the CellValue object returned and determine whether a date is present else boolean, number or string.

ducky427 commented 9 years ago

+1

mjul commented 9 years ago

Thanks a lot for the contribution, it was accepted with issue #33