VLOOKUP returns #VALUE

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VLOOKUP returns #VALUE

Kevin Wood
I'm having trouble with VLOOKUPS that reference other files.  Do I need to do
something special somewhere else when referencing another file?  Thanks.

Code:
======
HSSFCell cell = row.createCell(col);
String formula = "VLOOKUP(B2,'C:\\temp\\[test.xls]Test Sheet'!
$A$2:$E$1000,5,FALSE)";
cell.setCellFormula(formula);


When opened in Excel the cell displays #VALUE and contains:
=VLOOKUP(B2,#REF!$A$2:$E$1000,5,FALSE)




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/