I posted a similar question to the user e-mail list and didn't get answer so I
am hoping that someone on this list would be so kind as to provide some
guidance.
I am using POI 3.6 and we are accessing an .xls spreadsheet with the
ss.usermodel (though it should work with the .xslx as well). The sheet in
question leverages some VB code that could easily be written into a Java
function (POI blows chunks trying to evaluate these cells, which is expected,
is
it not?). We don't really have any other ideas of how to work around this so
we'd like to make POI think these calls are the same as calls to SUM or AVERAGE
Excel functions. There are two questions related to this:
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?
To pursue the second option, it looks to me like I need to add entry in the
resources/main/org/apache/poi/hssf/record/formula/function/functionMetadata.txt
and then add an implementation to the
org.apache.poi.hssf.record.formula.functions package.
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).
Thanks in advance for any suggestions or advice!
Sincerely,
Jon
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]