举例1
import win32com.client as win32
xl = win32.Dispatch('Excel.Application')
xl.Visible = True
xl.Workbooks.Add()
xlBook = xl.Workbooks(1)
xlSheet = xl.Sheets(1)
xlSheet.Cells(1,1).Value = 'What shall be the number of thy counting?'
xlSheet.Cells(2,1).Value = 3
print xlSheet.Cells(1,1).Value
print xlSheet.Cells(2,1).Value
举例2
#coding:utf-8
import win32com.client as win32
import time
import pythoncom
now = time.time()
print now
time_object = pythoncom.MakeTime(now)
print int(time_object)
xl = win32.Dispatch('Excel.Application')
xl.Visible = True
xl.Workbooks.Add()
xlBook = xl.Workbooks(1)
xlSheet = xl.Sheets(1)
xlSheet.Cells(1,1).Value = 'What shall be