# 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 身份证号获取
from openpyxl import load_workbook from openpyxl.styles import PatternFill def dum(): wb = load_workbook( […] 2.8 查询excel重复数据
from openpyxl import Workbook, load_workbook from datetime import date def create_data(): wb = Workbook() sh […] 2.7 统计加班时间
from openpyxl import load_workbook from openpyxl.styles import PatternFill wb = load_workbook(filename=r […] 2.6 隔行变色
from openpyxl import load_workbook,Workbook def create_excel(): wb = load_workbook('./办公自动化/files/工资表.x […] 2.5 工资条案例
import os from openpyxl import Workbook, load_workbook import re import shutil def copy_data(): wb = Workboo […] 2.4 多个excel 合并到多个sheet
import os from openpyxl import Workbook, load_workbook import re import shutil def copy_data(): wb = Workboo […] 2.3 openpyxl 数据合并到一个sheet
import openpyxl from openpyxl import Workbook from openpyxl.chart import ( Reference, Series, AreaChart3D ) […] 2.2 openpyxl 3D图表
from openpyxl import Workbook,load_workbook from openpyxl.chart import BarChart, Series, Reference # wb = Wo […] 2.1 openpyxl 图表案例