• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Trim Numbers if No Decimal Values  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1784
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have number values that have two decimal places. I am using java to export these values to excel. I need to check the number, if it has no decimal value change it to integer, if it has display as is. I am also keeping a cumlative value for each column that needs to be handled the same way.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37513
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Steve Dyke:
I need to check the number, if it has no decimal value change it to integer, if it has display as is.

Why? Excel can handle decimal places. What are you trying to accomplish with this?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!