Operating word python

pip install python.docx

from docx Import Document
Doc = Document ()
explanation: from from docx this file, import called a thing of the Document, Document is a document meant, so it is a thing of the word document to operate in the following Doc = Document (. ) can be understood as a class is the Document, this operation process is instantiated, the object is to generate: Doc

 

Guess you like

Origin www.cnblogs.com/xkdn/p/12319864.html