Python merging doc files into 1 doc file

我的梦境 提交于 2020-01-05 03:57:29

问题


In Python on Linux I would like to merge several .doc files into 1 .doc file? (The .doc file will be open in Windows machines). I have searched on internet but I don't find useful information.

I know that this feature is working for PDF in GhostScript, but now it needs also working for doc files.

Has somebody suggestions how to solve this issue?


回答1:


You may want to look into https://github.com/mikemaccana/python-docx which can help with reading/writing msft doc files. Once you have that working its just a simple read and append program.




回答2:


You can open and read contents of each files and write them in a separate file. You can File I/O functions.



来源:https://stackoverflow.com/questions/19363207/python-merging-doc-files-into-1-doc-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!