Thanks Nick for this change.

The only problem now is that after I've altered the ReferecePtgs I need to get the string representation of the altered formula.

To do this I need to call the FormulaParser.toFormulaString static method that still requires as a parameter the inaccessible Workbook class.

A possible solution to this would be to create a non-static version of this method that uses the 'book' member variable (defined when the FormulaParser object is instantiated) instead. Or we could create a wrapper method in the HSSFFormulaEvaluator class and pass the HSSFWorkbook to this version instead (as you have done in the getUnderlyingParser method).

Do either of these solutions sound doable?

Many thanks,

Tim



Nick Burch wrote:
On Fri, 12 Oct 2007, Tim Wilkins wrote:
If that solution is feasibly then it would certainly solve the issue of having to compile a custom version of POI. Allowing external code to utilise the FormulaParser class which would be very handy indeed!

I've added a static helper method to usermodel.HSSFFormulaEvaluator

As it's in the usermodel package, it's able to get at the protected getWorkbook method on a HSSFWorkbook. This then creates the underlying model.FormulaParser for you.

Hopefully that'll allow you to get at what you need, without leading to the confusion of new users if we just let everyone at model.Workbook

(You'll need to do a svn checkout / update to get the new methods)

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to