參照:https://blog.csdn.net/suhao0911/article/details/110950742
在新版python3.9中,windows中使用的更新刪除了getiterator方法,所以我們老版本的xlrd庫調用getiterator方法時會報錯。AttributeError: 'ElementTree' object has no attribute 'getiterator'
解決方法:
找出目錄python\Lib\site-packages\xlrd下的xlsx.py文件
修改兩個地方的的getiterator()改成iter(),下面的兩個地方,這里已經把getiterator()改成iter()了
然后重新載入程序即可