When converting to String you have to use a java.text.NumberFormat to
control the conversion.
For integer-like values (like zip codes) I usually use something like this:
double numericValue = cell.getNumericCellValue();
if (((long) numericValue) == numericValue) {
NumberFormat numberFormat = NumberFormat.getIntegerInstance();
numberFormat.setGroupingUsed(false);
stringValue = numberFormat.format(numericValue);
}
Martin
On Mon, Apr 28, 2008 at 9:35 PM, Tom Holmes Jr. <[EMAIL PROTECTED]> wrote:
>
> Likewise, we have some phone numbers as: 1112223333 or 12223334444
> This is also seen as a numeric value and the same problem happens. The
> numeric value as a double like 1.11222333E9 and then when it converts to
> String ... the value is the same, which is useless to me.
>
> Anyone find a way to work around this? Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]