Nick Burch-2 wrote
> Try looking at the testReferencesToOtherWorkbooks() method in
> TestXSSFFormulaEvaluation for a good example of doing it
> 
> https://svn.apache.org/repos/asf/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java

It seems that it was the method "evaluateAll()" the cause of my error.
When I go through my worksheet evaluating the value of each cell, I don't
get any error but it doesn't work neither...

When I open my workbook, I have cells with formulas using named range (to
external workbook: test.xlsx).
In my Java code, I change the reference of this named range to another
workbook (test2.xlsx).
But then when I evaluate the value of each cell, it keeps using the old
reference.
I suppose that the evaluation doesn't "evaluate" the value of the new named
range.

I really don't see how I can solve this problem.
I tried to close my workbook before reopen it and evaluate the value of the
formulas. 
But I get an error saying that the workbook "test.xlsx" (old reference) is
not a valid workbook in my environment. The error sais also that the valid
references are "main.xlsx" and "test2.xlsx", which is correct.



--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Setting-up-workbook-environment-XSSFFormulaEvaluator-tp5717305p5717307.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to