复制10%优惠码 【96YF71WTUG】
购买优动漫PAINT(CLIP STUDIO PAINT官方中文正版)
详情请戳:https://www.udongman.cn/index.php?m=product&c=csp
font_1 = document.styles['Normal'] # 样式 font_1.font.name = '思源宋体 CN' # 字体 font_1.font.size = Pt(8) # 字号 fk = document.add_table(df2.shape[0] + 1, df2.shape[1],style="Table Grid") # 设置表格并设置框线 fk.cell(0, 0).merge(fk.cell(0, 4)) # 合并单元格 run = fk.cell(0, 0).paragraphs[0].add_run('xxxx') # 写入内容 run.font.name = '思源宋体 CN' # 指定单元格设定字体 run.font.size = Pt(20) # 指定单元格设定字号 fk.cell(0, 0).paragraphs[0].alignment = WD_PARAGRAPH_ALIGNMENT.CENTER # 居中
document.sections[0].header.paragraphs[0].text = 'xxxx' document.sections[1].header.paragraphs[0].text = 'xxxx' #add_page_number(document.sections[0].footer.paragraphs[0]) #document.sections[0].footer.paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.RIGHT document.sections[0].footer.paragraphs[0].text = 'xxxx' document.sections[1].footer.paragraphs[0].text = 'xxxx' document.add_section() # 插入分节符,可当分页符用 document.add_paragraph("附页2:xxxxn")
from docx.shared import Inches, Pt from docx.oxml.ns import qn from docx import Document from docx.enum.text import WD_PARAGRAPH_ALIGNMENT#设置字符对齐docx
Copyright © 2022
wuwofcproject.com, All rights reserved
独家内容 未经许可 严禁复制、镜像、转载