Excel file format cannot be determined, you must specify an engine manually.
D:\software\python38\python.exe C:\Users\yy\Downloads\fuxi-data-testing-master\质控\1.输出三级绩效质控规则用例excel.py
Traceback (most recent call last):
File "C:\Users\yy\Downloads\fuxi-data-testing-master\质控\1.输出三级绩效质控规则用例excel.py", line 8, in <module>
df = pd.read_excel(file_path,sheet_name='界面1质控规则',usecols=['规则id','规则大类','规则小类','质控表编号','关联表编号','质控字段英文名','质控字段中文名','质控逻辑','参考值'])
File "D:\software\python38\lib\site-packages\pandas\io\excel\_base.py", line 478, in read_excel
io = ExcelFile(io, storage_options=storage_options, engine=engine)
File "D:\software\python38\lib\site-packages\pandas\io\excel\_base.py", line 1500, in __init__
raise ValueError(
ValueError: Excel file format cannot be determined, you must specify an engine manually.
todo,还没解决。。。
加上了engine之后
df = pd.read_excel(file_path,engine='openpyxl',sheet_name='界面1质控规则',usecols=['规则id','规则大类','规则小类','质控表编号','关联表编号','质控字段英文名','质控字段中文名','质控逻辑','参考值'])
报错
zipfile.BadZipFile: File is not a zip file
原因:
这个文件是加密的。。,另存一份不加密的再说