本文介绍了xlrd和open_woorkbook错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始使用python进行编程,并且在此程序中不断收到相同的错误:
I´m starting programming with python and I keep receiving the same error in this program:
import xlrd
import numpy as np
import matplotlib as plt
file_location = " X:\ \blabla.xlsx"
import workbook
wb=xlrd.open_workbook(filename= 'blabla.xlsx')
文件",位于
AttributeError:模块'xlrd'没有属性'open_workbook'
路径写得很好,我没有多个xlrd模块,我通过帮助功能查找了该模块:
The paths are well written and I don´t have more than one xlrd module, which I looked up trough help function:
help(xlrd)
NAMExlrd
包装内容文件(内置)
推荐答案
我将测试python文件命名为xlrd.py时遇到了相同的问题,该文件与模块同名.我更改了文件名,它可以正常工作.
I had the same problem when I named a test python file as xlrd.py which is the same name as the module. I changed the name of my file and it worked.
这篇关于xlrd和open_woorkbook错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!