tafia / calamine

A pure Rust Excel/OpenDocument SpreadSheets file reader: rust on metal sheets
MIT License
1.6k stars 155 forks source link

v0.23.0 worksheet_formula not reading majority of formulas #384

Closed luisdlt9 closed 6 months ago

luisdlt9 commented 6 months ago

calamine = "0.23.0" is not reading the majority of formulas on workbooks. On some workbooks it is not reading any formulas at all. As a simple example in the attached workbook I have 3 simple formulas scattered around, v0.23.0 only picks up a single formula "C1+E5". However, calamine = "0.22.0" picks up the 3 formulas correctly "C1+E5", "SUM(1+1)", "IF(OR(Q22=\"\",Q22=\"United States\"),\"US\",\"Foreign\")".

The formula issue isn't just with "0.23.0" even "0.22.0", "0.21.0", and "0.20.0" are not picking up a lot of the formulas in my workbooks, however "0.23.0" is exponentially worse at handling formulas, with most formulas not being picked up at all.

formula issue.xlsx

david-rse commented 6 months ago

Having the same problem I think. When iterating a worksheets rows, given a column with a formula, neither the value nor formula is captured within the &[DataType]. Not experiencing deserialization problems with other non-formula columns. Same issue whether iterating over the rows or iterator derived from RangeDeserializerBuilderas seen in the examples.

tafia commented 6 months ago

Should be fixed now. Sorry for that and thank you for reporting it!