willsonlincake 发表于 2022-4-14 19:35:58

Python快速进行文档处理

import docx
from simplify_docx import simplify

# read in a document
my_doc = docx.Document("/path/to/my/favorite/file.docx")

# coerce to JSON using the standard options
my_doc_as_json = simplify(my_doc)

# or with non-standard options
my_doc_as_json = simplify(my_doc,{"remove-leading-white-space":False})
页: [1]
查看完整版本: Python快速进行文档处理