Bug 62857 - DOLLAR function not implemented entirely
Summary: DOLLAR function not implemented entirely
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 4.0.0-FINAL
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: Beginner
Depends on:
Reported: 2018-10-26 09:27 UTC by Sven
Modified: 2020-01-01 20:24 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Sven 2018-10-26 09:27:06 UTC
The evaluation result for function call DOLLAR(1234.567;2) is just the raw numeric value itself. Without dollar sign, without thousands separators and without cutting/extending the value to the given number of decimal places.

In Method org.apache.poi.ss.formula.functions.new Var1or2ArgFunction() {...}.evaluate(int, int, ValueEval, ValueEval) for Function DOLLAR there is a comment:
// TODO - DOLLAR() function impl is NQR
// result should be StringEval, with leading '$' and thousands separators
// current junits are asserting incorrect behaviour

I think it's useful to document the difference from the expected behavior here in bugzilla, so that others can find it fast(er) when they search for unexpected DOLLAR-behavior.
Comment 1 Dominik Stadler 2020-01-01 20:24:46 UTC
This would probably be relatively easy thing to implement DOLLAR correctly for anybody new to developing for Apache POI, any takers?

Or at least provide changes to unit-tests so an implementation is properly verified.