I am using python 2.7 win32com module to load MS Excel worksheet from Python:
book = xlApp.Workbooks.Open("myFile.xls")
sheet = book.Sheets(1)
Many methods and properties of Range, Worksheet, etc. use enums such as XlDirection, XlFillWith, etc. They define constants such as xlDown, xlUp, xlFillWithContents, etc. Are these constants available for win32com so that I can do this, for example:
column = outputsSheet.Range("I5:I150")
lastRow = column.End(xlInterop.xlDown)
print "Last row:", lastRow.Row
This does not work because xlInterop is undefined, is there a way to access it using win32com? Finding values of constants like xlDown by trial and error is not very practical.
source
share