def __init__(self, filepath):
# ????excel???
if filepath.endswith('.xlsx') or filepath.endswith('.xls'):
if os.path.exists(filepath):
try:
# ??xlrd book??
self.fileHandle = xlrd.open_workbook(filepath)
except Exception as err:
logging.error("{} error: ????excel????! ????: {} ????: {}".format(
Operator.get_current_func(), filepath, str(err)))
if not self.fileHandle:
raise Exception('????excel????! ??????')
评论列表
文章目录