.net - Reading decimal value from an Excel cell (in C#) -


when reading values excel cells contain decimals, running following issue: if enter 9.95 in cell in excel, cellvalue.innertext in c# returns "9.9499999999999993"

how can actual value entered, meaning "9.95", knowing code that's trying these values not know ahead of time it's decimal or indeed number.

you cannot retrieve actual value entered numeric entry. don't believe stored anyplace. value see value stored; can retrieve value displayed (in vba .text propery of cell), don't think can value entered.

the issue has inherent impossibility of representing decimal numbers in binary.

see critique of excel xml format


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -