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" ?? 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 -- http://mail.python.org/mailman/listinfo/python-list