Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.3k views
in Technique[技术] by (71.8m points)

Embed object (archive, CSV...) into docx with Python script

I (and my team) currently plan to automatically generate Word documents from text sources.

However, we often need to embed some files such as zip archives or CSV tablesheets within these documents, and classic python libraries such as python-docx can't help on that topic.

I was not able to find a clear way of doing such task. I tried to use pywin32 from this example but with no success, which is not surprising since I have very limited knowledge about OLE object, COM technology and so on, and I was not able to find satisfying answers on (barely) similar topics.

I would gladly welcome any suggestion on how to perform such task (even if it's not via Python, we can always try), if anybody think it can be done.

If it can't be done, I can always think about other document delivery format, but I need one with clear revision/diff management (typically not PDF).

Thanks a lot for your help.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...