poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihaylov, Dimitar" <Dimitar.Mihay...@prospect-fs.com>
Subject RE: Evaluating formulas containing references to external workbooks
Date Tue, 10 Jul 2012 14:54:11 GMT
Thanks for the advice. I will try using the ForkedEvaluator and if it works, I will provide
some example code for the Quick Guide.

Thanks,

Dimitar

-----Original Message-----
From: Mark Beardsley [mailto:markbrdsly@tiscali.co.uk] 
Sent: 10 July 2012 15:32
To: user@poi.apache.org
Subject: Re: Evaluating formulas containing references to external workbooks

I think that you need to take a look at the ForkedEvaluator class -
http://poi.apache.org/apidocs/org/apache/poi/ss/formula/eval/forked/ForkedEvaluator.html

I have not had a play with this for a very long time now and cannot promise
that it will do what you require but there is a static setupEnvornment
method which is described thus;

*static void 	setupEnvironment(java.lang.String[] workbookNames,
ForkedEvaluator[] evaluators)
          Coordinates several formula evaluators together so that formulas
that involve external references 
          can be evaluated.*

I am going to guess that you need to create a ForkedEvaluator for each
workbook and then pass these objects as an array, along with an array of the
workbook's names, to this method. That is a guess though as I have not had
the need nor the opportunity to look into using this class. If you do make
any progress, would you consider posting some code that may be included into
the Quick Guide?

Yours

Mark B

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Evaluating-formulas-containing-references-to-external-workbooks-tp5710423p5710426.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message