Skip to content

Instantly share code, notes, and snippets.

@fereria fereria/sortTest.py Secret
Created Aug 21, 2015

Embed
What would you like to do?
SortTest
## -*- coding: utf-8 -*-
import win32com.client as win32
#Excel内のEnum型を取得する
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.