poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <apa...@gagravarr.org>
Subject Re: Linking External Workbooks
Date Thu, 06 Oct 2016 08:54:58 GMT
On Wed, 5 Oct 2016, Blake Watson wrote:
> I've also tried putting in "[1]" or "1" in the map rather than my
> spreadsheet name. I don't see in all this how the spreadsheet name in Excel
> comes out as "[1]" in POI.

That's just how Excel stores it for XLSX files. The link table provides 
the mapping between those indexes and the names shown in Excel. When POI 
hits one of those, it goes to the link table to find the name of the file, 
then checks for a setup referenced workbook with that name to resolve 
things with

Take a look at TestXSSFFormulaEvaluation method 
testReferencesToOtherWorkbooks() + referenced test files for how it ought 
to work

> 7. Vall evaluatorFormulaCell on the cell checked in step 3 and get:
> IllegalArgumentException Invalid sheetIndex: -1.
> org.apache.poi.ss.formula.SheetRefEvaluator.<init>
> (SheetRefEvaluator.java:36)

That doesn't look like the normal error for missing linked workbooks, so 
there might be a bug

Can you create two very simple workbooks, both with 2 sheets, one with a 
handful of data cells in, the other with your formula, which shows the 
problem? If so, please upload them to bugzilla along with a small junit 
unit test, and we'll take a look

Nick

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


Mime
View raw message