xxxxxxxxxx
from docx import Document
from openpyxl import Workbook
# Load the Word document
doc_path = 'path_to_word_document.docx'
doc = Document(doc_path)
# Create a new Excel workbook
wb = Workbook()
ws = wb.active
# Loop through each paragraph in the Word document
for para in doc.paragraphs:
# Write the text from each paragraph into a new row in the Excel sheet
ws.append([para.text])
# Save the Excel workbook
excel_path = 'path_to_excel_file.xlsx'
wb.save(excel_path)