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.
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.