Forums > Help! > Read Numeric value From Excel

Login/Join to Participate

1 post


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?


vain-ego pkvain-ego pkBRONZE Member
Lambretta Fanatic
4,997 posts
Location: United Kingdom

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.

Deamon_LlamaDeamon_LlamaBRONZE Member
78 posts
Location: Melbourne, Australia

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.

YakumoYakumoSILVER Member
1,237 posts
Location: Oxfordshire, United Kingdom

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

Mr ChutneyMr ChutneySILVER Member
1,712 posts
Location: Bristol,UK

Nor indeed why you are posting this on a poi forum?!

HOP Newsletter

Sign up to get the latest on sales, new releases and more...