sort in Excel

MK maria.kgn at gmail.com
Sun Apr 16 09:51:35 EDT 2006


u do it like this:

from win32com.client import Dispatch
xlApp = Dispatch("Excel.Application")
xlApp.Workbooks.Open("D:\python\sortme.csv")
xlApp.Range("A1:C100").Sort(Key1=xlApp.Range("B1"), Order1=2)
xlApp.ActiveWorkbook.Close(SaveChanges=1)
xlApp.Quit()
del xlApp




More information about the Python-list mailing list