Formatting Excel cells with PythonCOM
mhammond at skippinet.com.au
Thu Apr 6 19:45:01 EDT 2000
This code is from the win32com test suite (in testMSOffice.py)
# test dates out with Excel
xl.Cells(5,1).Value = "Excel time"
xl.Cells(5,2).Formula = "=Now()"
xl.Cells(6,1).Value = "Python time"
xl.Cells(6,2).Value = pythoncom.MakeTime(time.time())
xl.Cells(6,2).NumberFormat = "d/mm/yy h:mm"
"Scott" <sbarron at ansic.net> wrote in message
news:38ECAF9D.ECA74709 at ansic.net...
> I am looking for information regarding how to set the Date/Time
> for Excel cells. When I enter my dates/times I use the
> and the COMDate member of my objects. When I open Excel it
> them as ###### until I manually set the date/time format. How
can I do
> this from within my Python program?
More information about the Python-list