Skip to content

Instantly share code, notes, and snippets.

@fereria fereria/ Secret
Created Aug 21, 2015

What would you like to do?
## -*- coding: utf-8 -*-
import win32com.client as win32
x = win32.gencache.EnsureDispatch("Excel.Application")
xlApp = win32.Dispatch("Excel.Application")
excelFile = "E:/textExcelB.xlsx"
wb = xlApp.Workbooks.Open(excelFile)
sheet = wb.Worksheets(1)
sheet.Range("A1:A10").Sort(Key1=sheet.Range("A1"),Order1=1, Header=1, Orientation=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.