0
我跑表格复制到另一个
Python Version: 2.7.12 |Anaconda 4.1.1 (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)]
Pandas Version: 0.18.1
IPython Version: 4.2.0
和安装蟒蛇,DOCX与
conda install -c conda-forge python-docx=0.8.6
我有它的一些表一的docx文件,我想要么
1)将文档中的一些表格复制到新的表格中,或者
2)删除一些表格es从文件中,
可以说第一个表格,用于1)或2)。
对于1)我试图用这个帖子在这里(Python: Copy content from one word document to another word document and keeping format?) ,但我上线的
name 'opendocx' is not defined
错误
document = opendocx('xxxzzz.docx')
,如果我更换 opendocx 与 文件 我得到一个
'Document' object has no attribute 'xpath'
错误。
我猜opendocx是在早期版本或其他东西上使用的,所以我无法解决问题。
有什么建议吗?
感谢您的回答。我知道文档,但我想复制表格,以便保留所有内容和格式,样式,行列尺寸等。关于如何做到这一点的任何建议? – akotronis