[python-win32] writing long integer values to Excel
S Murthy Kambhampaty
smk_va at yahoo.com
Sat Feb 11 01:13:59 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?
Environment:
Windows 2000
Python 2.4.2
pywin32-207
Thanks for the help,
Murthy
Steps to replicate:
from win32com.client import Dispatch
xlApp=Dispatch("Excel.Application")
xlApp.Visible=1
xlBook=xlApp.Workbooks.Add()
xlBook.Sheets(1).Range("B2").Value=3 *10 **9 # Excel
stores -1294967296
xlBook.Sheets(1).Range("B2").Value=3.0 *10 **9 # Excel
stores 3000000000
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Python-win32
mailing list