How do I extract data from a doc/docx file using Python

后端 未结 4 1858
[愿得一人]
[愿得一人] 2020-12-08 23:57

I know there are similar questions out there, but I couldn\'t find something that would answer my prayers. What I need is a way to access certain data from MS-Word files and

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 00:37

    A more simple library with image extraction capability.

    pip install docx2txt
    


    Then use below code to read docx file.

    import docx2txt
    text = docx2txt.process("file.docx")
    

提交回复
热议问题