pyExcelerator big integer values

Gacha gatis.tomsons at gmail.com
Tue Jan 16 06:54:28 EST 2007


John Machin wrote:
> Here's a possible replacement -- I say possible because you have been
> rather coy about what you are actually trying to do.
>
> value = values[(row_idx, col_idx)])
> if isinstance(value, float):
>     v = repr(value)
> else:
>     v = unicode(value)
>
> HTH
> John

My final result:

value = values[(row_idx, col_idx)]
if isinstance(value, float) and
re.match('^\d+\.\d+e\+\d+$',unicode(value)):
    v = repr(value)
else:
    v = unicode(value)




More information about the Python-list mailing list