python-docx
python-docx

Hearding Style (标题)
docx.styles['Heading 1'].font.name = 'Arial' |
Paragraph Style (段落)
for para in docx.paragraphs: |
Normal Style (正文)
docx.styles['Normal'].font.name = 'Arial' |
Run Style (连续块)
for para in docx.paragraphs: |
Table Style (表格)
tbl = docx.add_table(3, 3, style='Table List Accent 1') |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.