• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

VLOOKUP with POI shows #VALUE! error

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 !
 
Grow your own food... or this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic