1. Is this a recommended approach for this sort of issue? Is there another
approach that works better and requires less customization of the library?
2. Does POI already have a facility for adding new functions to the library or
overriding existing ones?
The feature you want is called User-Defined Function (UDF) and is
supported by POI. A good example how to use UDF can be found in POI test
cases:
https://svn.apache.org/repos/asf/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/eval/TestExternalFunction.java
This code was contributed a year back in
https://issues.apache.org/bugzilla/show_bug.cgi?id=47809
Please read the last comment by Josh Micich to better understand how
this API is organized.
I'll also throw this out there: my team might be able to contribute something to
POI that formalizes this - the ability to add or override existing functions
provided it doesn't force us to re-design/re-write large portions of POI. As
such we're interested in knowing what would need to be done (assuming this is a
good idea).
Patches are always welcome. If you have an idea how to improve the work
with UDF - please share it on poi-dev or submit a patch to Bugzilla.
Regards,
Yegor
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]