-
-
Save fereria/57bdd6a5c4f3d9e3ed32 to your computer and use it in GitHub Desktop.
SortTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## -*- 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