[python-win32] writing long integer values to Excel

Mark Hammond mhammond at skippinet.com.au
Mon Feb 13 01:14:21 CET 2006


> I got the impression from table 12-1 of "Python
> Programming on Win32" that writing 3 *(10 **9) to
> Excel would succeed, but it seems to overflow, while
> writing 3.0 *(10 **9) succeeds.  Is this standard
> behavior, or perhaps a bug?

Yes, it is a bug.  I have fixed it here.  As you noticed, a work around is
to use a Python float.  As COM pre windows XP doesn't support 64bit ints,
underneath the covers these large values are converted to a double anyway,
so you don't really lose much.

Let me know if you would like a new DLL to test with though.

Regards,

Mark



More information about the Python-win32 mailing list