File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Losing decimal places when using JXL

 
surendar prabu
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to read an excel sheet using the JXL API. When reading a cell with float/double values, the is returning only 3 decimal places. i.e; I get 0.169 in place of 0.16945.
Help me on how I can read the exact number in the cell.

Regards,
Surendar.
 
Allan Sy
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same problem. It always rounds to 3 decimal places for number. I need this because I am dealing with foreign exchange rates and it should not be rounded off.

Can anybody help?

Thanks!
 
Allan Sy
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this one out.

http://www.andykhan.com/jexcelapi/tutorial.html#reading

But I'm still having problems because 0.000109 has been converted to 1.09E-4.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Allan Sy wrote:But I'm still having problems because 0.000109 has been converted to 1.09E-4.

That's the same number, just displayed differently. Have you tried a different cell format?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic