excelReader.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:apiTest 作者: wuranxu 项目源码 文件源码
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????! ??????')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号