This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Java in General and the fly likes hssf numerical types Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "hssf numerical types" Watch "hssf numerical types" New topic

hssf numerical types

jeroen dijkmeijer
Ranch Hand

Joined: Sep 26, 2003
Posts: 131
I'm wondering.. Am i doing something stupid here or is my poi build (poi-2.5.1-final-20040804.jar) broken?
It looks very basic, the behavior is unexpected, the lib is over 2 years old now and I havent found any claims with the same issues @google normally making me very suspicious of my own qualities.

I've got a cell which does contain a numeric.
But doing cel.getCellType() does not give me a HSSFCell.CELL_TYPE_NUMERIC (0) but 2.

Any feedback would be appreciated.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39576
Although that is a number, the cell might be formatted as a formula (which is type 2), and the value might be the result of evaluating the formula. What is the result of calling cel.getCellFormula()?

Ping & DNS - updated with new look and Ping home screen widget
I agree. Here's the link:
subject: hssf numerical types
Similar Threads
doubt readinf excel using poi could not find thread for poi
help reading formula cells using HSSF....
POI apache Reading Excel (strange case)
How can I analize Excel file with Apache POI?
How do i format a string to date