Files
yj_resume/service/parse_resume_doc.py
2025-12-05 11:43:37 +08:00

13 lines
323 B
Python

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