• All Purchases made this month instantly go into the draw to win a USD $ 100.00 credit to your HoP account.
 

Forums > Help! > Read Numeric value From Excel

Login/Join to Participate

Sreeram


newbie


Total posts: 1
Posted:Hi,

I was trying to read numeric value from an excel file.I used the function "cell.getNumericCellValue()" to read the column. Some times the value is fetched correctly and some times it returns a high precision value( ie, some times the value 118.474 is fetched as 118.4739999999), while I require the exact value.
The format type of the column in the excel is "custom".

Can any one please help me on this?

Sreeram


Delete Topic

PK_
BRONZE Member since Dec 2001

PK_

Lambretta Fanatic


Total posts: 4993
Posted:118.4739999999 ...considering excel uses better calculations than myself I'd say that figure was most likely to be correct when 118.474 may look logically correct.

I'm no mathematician nor excel user.

Good luck.


PK.

"To be an angel, one need not have wings.
In giving love there is an equal grace.
Nor need one seek the aura in the face,
As love unveils the beauty of all things."

*Francois Couperin.

Delete

Deamon_Llama
BRONZE Member since Oct 2007

Deamon_Llama

member
Location: Melbourne

Total posts: 78
Posted:I can show mathematically that 118.4739999999 is actually equal to 118.474, but I don't think that will be particularly useful, sorry frown

---
No statements are true unless they can be proven scientifically.
---

Delete

Yakumo
SILVER Member since May 2006

Yakumo

veteran
Location: Oxfordshire

Total posts: 1237
Posted:are you always reading cell.getNumericCellValue into a variable with a datatype that can hold the full value? and are all the fields your reading from definitely formatted correctly?



same problem is discussed here though you havn't actually said what language you're programming/scripting in...


Blinded by Hyperlights, please donate generously grin

Delete

Mr_Chutney
SILVER Member since Apr 2003

Mr_Chutney

Tosser
Location: Herefordshire

Total posts: 1711
Posted:Nor indeed why you are posting this on a poi forum?!

Delete


Similar Topics

Using the keywords [read numeric value excel] we found the following similar topics.
1. Forums > Read Numeric value From Excel [4 replies]
2. Forums > Best value glowpoi? [40 replies]
3. Forums > HOP day!!! READ ME! READ ME! READ ME! [54 replies]
4. Forums > FAL4 ESSENTIALS - READ ONLY! [15 replies]
5. Forums > For those who have read Douglas Adams, read on [11 replies]

     Show more..