我有odfpy和Python 3的问题。我尝试复制Opendocument Text文件中的现有表。我没有从原始表中获取样式信息。这是我的代码:
# templateTable is a table.Table that has to be copied
for childNode in templateTable.childNodes:
if 'style-name' in str(childNode.attributes):
# the next command fails and the python interpreter tells me
# 'style-name' is not in list
style = childNode.getAttribute('style-name')
欢迎提供帮助!