When using cell.getValue on a number column, the Object type returned is not the always what you would expect. For a money column the return was usually Double, but would sometimes return an Integer. When the value was 0, the return type was sometimes returned as String.
Had to use a wrapper function:
public static final Double getDoubleValue ( Cell cell ) {
static final DecimalFormat df = new DecimalFormat();
...
switch ( cell.getValueType() ) {
case CellValueType.DOUBLE:
return (Double)cell.getValue();
case CellValueType.INT:
return ((Integer)cell.getValue()).doubleValue();
case CellValueType.STRING:
return df.parse((String)cell.getValue() ).doubleValue();
default:
throw new NumberFormatException( "" );
}
...
}