Home > other >  Python can be fulfilled Word document download?
Python can be fulfilled Word document download?

Time:09-16

Want to know python can achieve similar to export excel file as the export function Word file? Download directly to the local computer, a great god guidance!!!!!!

CodePudding user response:

Do you want to realize what function:
1, document conversion? - extract content, deposited in the corresponding documents,
2, the deposit to the local network data obtained by the crawler? - I generally use pandas, deposited in the CSV file,

CodePudding user response:

Not, oneself use python to do a word document, to achieve similar to export excel file, export to the function of the local computer, download to your computer, or on other visitors to the computer, don't know how to write the word? Also please bosses give advice or comments!

CodePudding user response:

Sorry, here is not very clear,

CodePudding user response:

The
reference 3 floor lanzhen001 response:
sorry, here is not very clear,

That's ok, still very grateful to the bosses can reply me,

CodePudding user response:

Can, need to install a package, called python - docx,
With PIP install python - docx installation,

Specific can search online tutorials, or pretty much,

Give you post a link: https://zhuanlan.zhihu.com/p/61340025

But this zhihu merely as a system are introduced, such as had not told how to save, you can look at the official documentation,

Export actually use the document object inside the save (path),
Give you posted a link to https://python-docx.readthedocs.io/en/latest/api/document.html#docx.document.Document.save
The rest is to explore yourself

CodePudding user response:

Ok thank you, find a lot of online tutorials, but sometimes the use of modules is very confused, and don't know what the library is, anyway have to explore more, thank you!!!

CodePudding user response:

Python - docx use more, written word than excel
  • Related