XL でワークシートを開こうとしています。ワークシートには、「Map」、「map」、または「MAP」という名前を付けることができます
これが私がしていることです
import xlrd
book = xlrd.open_workbook(xls) // where xls is the name of the spreadsheet
try:
sheet = book.sheet_by_name('map')
except:
try:
sheet = book.sheet_by_name('Map')
except:
try:
sheet = book.sheet_by_name('MAP')
except:
raise
これはかなり不格好に見えます...これを行うためのよりpythonicな方法はありますか