Bug 57332

Summary: FormulaEvaluator with external references
Product: POI Reporter: patrick.avez
Component: XSSFAssignee: POI Developers List <dev>
Status: NEEDINFO ---    
Severity: normal    
Priority: P2    
Version: 3.11-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Java test code
Main.xlsx Excel file
Test1.xlsx Excel file
Test2.xlsx Excel file

Description patrick.avez 2014-12-09 08:26:21 UTC
Created attachment 32273 [details]
Java test code

Hello,

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.
Comment 1 patrick.avez 2014-12-09 08:27:05 UTC
Created attachment 32274 [details]
Main.xlsx Excel file
Comment 2 patrick.avez 2014-12-09 08:27:25 UTC
Created attachment 32275 [details]
Test1.xlsx Excel file
Comment 3 patrick.avez 2014-12-09 08:27:45 UTC
Created attachment 32276 [details]
Test2.xlsx Excel file
Comment 4 Dominik Stadler 2015-03-01 18:45:41 UTC
Can you try to provide a unit-test or at least a self-sufficient java-snippet which shows how you trigger the problem? This would make it much easier to reproduce and fix this problem.
Comment 5 patrick.avez 2015-03-09 08:45:04 UTC
I am really not used to Java programming and I don't get the meaning of "java-snippet" or "unit-test".
I attached some Java-code to show the problem but I don't really know what I can do more...
I want to help and I want to try to provide the requested information. But could you send me a link where I can find an explanation over the meaning and the creation of a Java-snippet?
Comment 6 Dominik Stadler 2015-03-13 16:52:45 UTC
Sorry, didn't see the attachment in the original post...
Comment 7 Javen O'Neal 2017-07-10 02:23:05 UTC
Is this still an issue in the latest version of POI?