I am maintaining a Python script that uses xlrd to retrieve values from Excel spreadsheets, and then do various things with them. Some of the cells in the spreadshe
xlrd
You can use repr() to convert to a string without losing precision, then convert to a Decimal:
repr()
>>> from decimal import Decimal >>> f = 0.38288746115497402 >>> d = Decimal(repr(f)) >>> print d 0.38288746115497402