报错内容如下:
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6 https://aka.ms/pscore6
PS C:\Users\Allen\Desktop-\2021暑假\python编程\py_code> & D:/Programs/Python/Python39/python.exe c:/Users/Allen/Desktop/-/2021暑假/python编程/py_code/excel操作.py
Traceback (most recent call last):
File "c:\Users\Allen\Desktop-\2021暑假\python编程\py_code\excel操作.py", line 16, in
show_sheets()
File "c:\Users\Allen\Desktop-\2021暑假\python编程\py_code\excel操作.py", line 11, in show_sheets
wb = load_workbook('test1.xls')
File "D:\Programs\Python\Python39\lib\site-packages\openpyxl\reader\excel.py", line 315, in load_workbook
reader = ExcelReader(filename, read_only, keep_vba,
File "D:\Programs\Python\Python39\lib\site-packages\openpyxl\reader\excel.py", line 124, in init
self.archive = _validate_archive(fn)
File "D:\Programs\Python\Python39\lib\site-packages\openpyxl\reader\excel.py", line 94, in _validate_archive
raise InvalidFileException(msg)
openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support the old .xls file
format, please use xlrd to read this file, or convert it to the more recent .xlsx file format.
PS C:\Users\Allen\Desktop-\2021暑假\python编程\py_code>
为什么现在一运行程序就会出现这么一长串报错?