import xlrd

workbook = xlrd.open_workbook(r'D:\Workspace\planning\GTFS\OASA_2019_11\OASA BusLines GTFS.xls')
worksheet = workbook.sheet_by_name('OASA BusLines GTFS') # Το Worksheet μέσα στο Excel
cols = worksheet.ncols # Number of columns
rows = worksheet.nrows # Number of columns

# Βρίσκω σε ποιες στήλες βρίσκονται τα πεδία 'ROUTE_SHORT_NAME', 'ROUTE_LONG_NAME' & 'USE'
for c in range(0, cols):
col=worksheet.cell_value(0, c)
if (col=='ROUTE_SHORT_NAME'):
cROUTE_SHORT_NAME=c
print cROUTE_SHORT_NAME
if (col=='ROUTE_LONG_NAME'):
cROUTE_LONG_NAME=c
print cROUTE_LONG_NAME
if (col=='ROUTE_TYPE'):
cROUTE_TYPE=c
print cROUTE_TYPE
if (col=='USE'):
cUSE=c
print cUSE

for r in range(1, rows):
if worksheet.cell_value(r, cUSE)==1:
print worksheet.cell_value(r , cROUTE_SHORT_NAME), worksheet.cell_value(r , cROUTE_LONG_NAME)

Σχετικό:
ArcPySelectBusLine_06.py

Δείτε:
xlrd