xlwt包已经下载并安装,可是无法创建???不知为何?
import xlwt
workbook = xlwt.Workbook(encoding = 'utf-8')# 创建workbook 对象
worksheet = workbook.add_sheet('sheet1') # 创建工作表
worksheet.write(0,0,'hello') # 写入数据,第一行参数行,第二行为列,第三个为内容。
workbook.save('student.xls')
显示如下错误:
workbook = xlwt.Workbook(encoding = 'utf-8')# 创建workbook 对象
AttributeError: partially initialized module 'xlwt' has no attribute 'Workbook' (most likely due to a circular import) most likely due to a circular import?????
页:
[1]