docx
Installation
SKILL.md
DOCX
Practical patterns for reading, writing, and templating Microsoft Word
.docxfiles.
Prerequisites
- Python 3.9+
- Pick libraries by task:
python-docx-- read/write paragraphs, runs, tables, sections, headers/footersdocxtpl-- Jinja2-style templating on top of a designer-authored.docxmammoth-- convert.docx-> clean HTML or Markdown (drops most styling)pandoc(CLI) -- convert between Markdown / HTML /.docxreliably
When to Use
- Input or output of the task is a
.docxfile - You need to generate a Word report (proposals, contracts, briefs)
- You need to extract text or tables from Word for downstream processing
- You need to merge a data row set into a designer-authored template