模块“ xlwings”没有属性“书” [英] module 'xlwings' has no attribute 'Book'

查看:624
本文介绍了模块“ xlwings”没有属性“书”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次尝试使用xlwings,但我不太了解该文档。
从快速入门部分中阅读

I'm trying to use xlwings for the first time but I can't quite understand the documentation. From the section "Quickstart" I read

import xlwings as xw       

wb = xw.Book()  # this will create a new workbook    

当我在家里尝试此操作时,我导入xlwings没问题,但是在第二个脚本中出现了这个错误:

When I try this "at home", I have no problem importing xlwings but with the second script I get this error:

AttributeError: module 'xlwings' has no attribute 'Book'

当我尝试查看xw的属性时,我可以看到AboveBelow,ActionTime等,但是找不到预订。

When I try to see the attributes of xw I can see AboveBelow,ActionTime etc. but not Book.

您能帮忙吗?

非常感谢。

推荐答案

我也遇到了错误,从Workbook更改为Book。这是一个版本问题。

I had the error also and changed from Workbook to Book. It is a version issue.

wb = xw.Workbook()

wb = xw.Workbook()

这篇关于模块“ xlwings”没有属性“书”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆