我看到有两个库可以使用:pyexcel_ods3
和pyexcel_ods
。
我试着用
pyexcel_ods.Sheet("file.ods")
及
pyexcel_ods.get_book(file_name="file.ods")
但我犯了以下错误:
AttributeError: module 'pyexcel_ods' has no attribute 'Sheet'
AttributeError: module 'pyexcel_ods' has no attribute 'get_book'
你能帮我吗
Tags:
您可能安装时出错了
检查您是否同时拥有
pyexcel
和pyexcel-ods
:请尝试以下代码:
(您可以在此处获取有效的示例文件https://file-examples.com/index.php/sample-documents-download/sample-ods-download/)
要获取名称,请执行以下操作:
结果:
请注意,在您的示例中,您试图直接在
pyexcel_ods
模块上调用get_book
和Sheet
,而我只导入pyexcel
(并安装了ods模块),这样就可以了,pyexcel在打开.ods文件时会自动找到该模块相关问题 更多 >
编程相关推荐