SuperAPI AI Directory

docx-processor

Design & creation

View repository

Updated 10-15 21:04

About this skill

Word Document Processor Skill

This is a skill for creating and editing Word documents (.docx).

Main Features

  • Document Creation: Headers, footers, paragraphs
  • Style: Fonts, colors, formatting
  • Table: Table creation
  • Images: Image insertion
  • Conversion: Markdown → DOCX

Python (python-docx)

from docx import Document
from docx.shared import Inches, Pt, RGBColor

doc = Document()
Title

title = doc.add_heading('Report Title', 0) title.alignment = WD_ALIGN_PARAGRAPH.CENTER

Paragraphs

p = doc.add_paragraph('This is the body text.') p.add_run(' Bold text').bold = True p.add_run(' Italic text').italic = True

Table

table = doc.add_table(rows=3, cols=3) table.style = 'Light Grid Accent 1'

hdr_cells = table.rows[0].cells hdr_cells[0].text = 'Name' hdr_cells[1].text = 'Age' hdr_cells[2].text = 'Occupation'

Images

doc.add_picture('image.png', width=Inches(4))

doc.save('report.docx')


## バージョン情報
- Version: 1.0.0