jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes HSSF and getNumericCellValue() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "HSSF and getNumericCellValue()" Watch "HSSF and getNumericCellValue()" New topic

HSSF and getNumericCellValue()

Andrew Mcmurray
Ranch Hand

Joined: Sep 24, 2005
Posts: 188
Hi all,

I am using cell.getNumericCellValue() to get the value of a cell. I want have the value as a string so I toString the Double. The problem is the string then has the decimal and the E for values that are too big. Like 3.65871133792E13 where I want like 365871133792. Any thoughts?


Ajay Singh
Ranch Hand

Joined: Dec 13, 2006
Posts: 182
use NumberFormat to format it,

String text = new DecimalFormat("############").format(call.getNumericCallValue());
Andrew Mcmurray
Ranch Hand

Joined: Sep 24, 2005
Posts: 188
Thanks Ajay

It looks like I only needed on '#' on the Decimal format and it seemed to work.

I agree. Here's the link: http://aspose.com/file-tools
subject: HSSF and getNumericCellValue()
Similar Threads
Get the characters from String.
Passing a String by reference
replace value of string
String to int
How to read follwing String