write float to Excel with pyExcelerator write

Peter Otten __peter__ at web.de
Mon Mar 3 11:43:04 CET 2008

Cyril.Liu wrote:

> I use pyExcelerator to generat Excel files in my project. it works good
> before I found this bug:
> run this code:
> from pyExcelerator import *
> wb = Workbook()
> ws = wb.add_sheet("sheet")
> for i  in xrange(1):
>     ws.write(i,0, 10474224.6)
> wb.save(r'd:\error_float.xls')
> open d:\error_float.xls with M$ Excle you'll find the number in the cell
> is -263193.64 not 10474224.6
> why? some body help me please.

It's probably a bug in pyExcelerator:


There's a patch by John Machin, 


and the problem should be fixed in subversion.


More information about the Python-list mailing list