def send_email(): # smtplib email import smtplib from email.mime.text import MIMEText from email.header impo […] 6.1 批量发送邮件-工资条
def send_email(): # smtplib email import smtplib from email.mime.text import MIMEText from email.header impo […] 6. 发送邮件
from pptx import Presentation from pptx.util import Pt,Cm from pptx.dml.color import RGBColor from pptx.enum […] 5.5 添加形状并设置样式
from pptx import Presentation from pptx.util import Pt,Cm from pptx.dml.color import RGBColor from pptx.enum […] 5.4 添加表格并设置样式
from pptx import Presentation from pptx.util import Pt,Cm from pptx.dml.color import RGBColor from pptx.enum […] 5.3 设置文字框样式与文字样式
def use_bar(path): from pptx import Presentation from pptx.chart.data import CategoryChartData from pptx.enu […] 5.2 ppt 绘制bar、line、pie图表
# ppt 增加流程图 def add_flow_chart(path): from pptx import Presentation from pptx.enum.shapes import MSO_AUTO_SH […] 5.1 ppt 流程图
# PPT 基本操作 """ slide(幻灯片): 一个ppt由一系列的slide构成 slide_master(幻灯片母版): 母版可定义主题样式基准 slide_layouts(模 […] 5. ppt 基础操作
# pip install pypdf2,pypdf3 # 读取pdf文档 def read_pdf(path): # pip install pypdf2 from PyPDF2 import PdfReader […] 4. pdf 基础操作
from win32com.client import gencache from win32com.client import constants def createPdf(wordPath, pdfPath): […] 3.4 word 转 pdf
from docx import Document from datetime import datetime import os date = datetime.now() infos = [ ['浙AD […] 3.3 通过模板生成文件
from docx import Document from docx.shared import Pt, RGBColor, Inches from docx.oxml.ns import qn from docx […] 3.2 案例-违章通知书
from docx import Document from docx.oxml import OxmlElement from docx.oxml.ns import qn from docx.shared imp […] 3.1 自定义字符间距-无效参考
# pip install python-docx def first(): from docx import Document doc1 = Document() doc1.add_heading('如何 […] 3. Word 基本操作
from openpyxl import load_workbook from datetime import datetime def get_time(): wb = load_workbook('./ […] 2.9.1 身份证号年龄提取
# 获取随机个人信息写入表格 import sys,os # base_dir=os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # print( […] 2.9 身份证号获取