This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes VLOOKUP with POI shows #VALUE! error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "VLOOKUP with POI shows #VALUE! error" Watch "VLOOKUP with POI shows #VALUE! error" New topic
Author

VLOOKUP with POI shows #VALUE! error

Jay Vaghela
Greenhorn

Joined: Feb 15, 2006
Posts: 22
I am using the VLOOKUP formula with HSSFWrokbook and the generated Excel file shows #VALUE! error. it says that "a value used in the formula is of the wrong data type". I dont understand it.

Code:
summaryCell.setCellFormula("VLOOKUP($F"+(tableRows+8)+",$A$8:$D$"+(resultSize+7)+",2,FALSE)");
which turns to
summaryCell.setCellFormula("VLOOKUP($F8,$A$8:$D$26,2,FALSE)");

Where $F8 column is a date value = 6/30/2011 11:25:39 AM, and it is dispalys like "6/30/2011" in F8.

It works with the String value, like if i directly provide the value e.g. summaryCell.setCellFormula("VLOOKUP(\"TOTAL\",A8:D30,4,FALSE)");
Its works fine. But it doesn't work with the reference like $F8.

Thanks in Advance !
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: VLOOKUP with POI shows #VALUE! error
 
jQuery in Action, 3rd edition