EasyXLS
http://forum.easyxls.com/

Handling long numbers...
http://forum.easyxls.com/viewtopic.php?f=10&t=734
Page 1 of 1

Author:  suresh kumar m r [ Sat Sep 27, 2008 8:20 am ]
Post subject:  Handling long numbers...

Hi,
Our testing team as part of negative testing inputs a very long number in excel and the application fails whenever it tries to read such a huge number.

For example: 2.22222222222222E+96

Here I receive it in exponential format. How to read this such a huge number back?

Any ideas appreciated.

Regards,
SURESH KUMAR M R

Author:  oana [ Tue Sep 30, 2008 5:51 am ]
Post subject: 

Here is a sample code for formatting the number:

Code:
double dBigNo = 2.22222222222222E+96;
DecimalFormat dFDefault = (DecimalFormat)NumberFormat.getNumberInstance();
dFDefault.applyPattern("#.00");
String sNewDouble = dFDefault.format(dBigNo);
System.out.println(sNewDouble);

Page 1 of 1 All times are UTC - 4 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/