修改结构
This commit is contained in:
13
service/parse_resume_doc.py
Normal file
13
service/parse_resume_doc.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from docx import Document
|
||||
|
||||
def extract_tables_from_docx(file_path):
|
||||
doc = Document(file_path)
|
||||
tables = []
|
||||
for table in doc.tables:
|
||||
rows = []
|
||||
for row in table.rows:
|
||||
|
||||
cells = [cell.text for cell in row.cells]
|
||||
rows.append(cells)
|
||||
tables.append(rows)
|
||||
return tables
|
||||
Reference in New Issue
Block a user