parent
a37b1a87ca
commit
4578435c40
@ -1,13 +0,0 @@
|
||||
import docx
|
||||
|
||||
|
||||
class SplitDocxUtil:
|
||||
@staticmethod
|
||||
def read_docx(file_path):
|
||||
"""读取docx文件内容"""
|
||||
try:
|
||||
doc = docx.Document(file_path)
|
||||
return "\n".join([para.text for para in doc.paragraphs if para.text])
|
||||
except Exception as e:
|
||||
print(f"读取docx文件出错: {str(e)}")
|
||||
return ""
|
Binary file not shown.
Loading…
Reference in new issue