Formatting Excel cells with PythonCOM
Scott
sbarron at ansic.net
Fri Apr 7 10:25:13 EDT 2000
Hi Mark,
Wouldn't you know not 5 minutes after I posted the messag I figured it
out using the Excel VBA help. Anyway, thanks for the information. Btw,
I bought and read your PPW over my spring break and it helped me
tremendously, thanks!
Scott
Mark Hammond wrote:
>
> 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()"
>
> import time
> 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"
> xl.Columns("A:B").EntireColumn.AutoFit()
>
More information about the Python-list
mailing list