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 re
Gacha wrote:
> Thank you, the repr() function helped me a lot.
>
> v = unicode(values[(row_idx, col_idx)])
> if v.endswith('e+12'):
> v = repr(values[(row_idx, col_idx)])
That endswith() looks rather suspicious ... what if it's +11 or +13,
and shouldn't it have a zero in it, like "+012" ??
H
Thank you, the repr() function helped me a lot.
v = unicode(values[(row_idx, col_idx)])
if v.endswith('e+12'):
v = repr(values[(row_idx, col_idx)])
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 10, 12:30 am, "Gacha" <[EMAIL PROTECTED]> wrote:
> I use pyExcelerator to import some data from xml file. One column
> contains integer values like:
> 4750456000708
> 4750456000715
> 4750456000333
I think you must mean "xls", not "xml".
Those are integers only in the mathematical sens
I use pyExcelerator to import some data from xml file. One column
contains integer values like:
4750456000708
4750456000715
4750456000333
...
But when I do import the pyExcelerator converts them to something like
this:
4.7504560002e+12
4.7504560007e+12
4.7504560007e+12
4.7504560003e+12
How I under