On Thu, 4 Dec 2014, negatron wrote:
Thanks! I didn't know this method was necessary to use external references.
Unfortunately the linkExternalWorkbook method isn't implemented yet (that is
the new error I get).
It is also said: "see bug #57184".

Patches and enhancements welcome! :)

(Hopefully the bug will list what's still needed, and there's probably a bunch of disabled unit tests too)

That is the other way - if a workbook already has a link defined to an
external workbook, then POI can re-use that link when defining additional
names or formulas to it

Problem is that I want to adapt the path to the external reference.
The named range can point to a file or another (test.xlsx or test2.xlsx)
given the inputs on the Java interface.
Each time I change the name of the file (test.xlsx), I would have to open my
Excel file (main.xlsx) and change the external reference which is not very
practical.

Why not add two named ranges, or formulas in a hidden sheet, one pointing to each of the two possible workbooks?

POI should be able to add new named ranges and formulas for a workbook where the links are already set up, so you should be fine to change the main formulas as needed when the links are in place.

Well, or contribute the missing bit of functionality so everyone can use linkExternalWorkbook :)

Nick

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

Reply via email to