Bug 62857

Summary: DOLLAR function not implemented entirely
Product: POI Reporter: Sven <poi>
Component: SS CommonAssignee: POI Developers List <dev>
Status: NEEDINFO ---    
Severity: normal Keywords: Beginner
Priority: P2    
Version: 4.0.0-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

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.