import pandas as pd
from datetime import datetime,timedelta
df = pd.read_clipboard() # 从粘贴板上读取数据
t = datetime.now().date() - timedelta(days=1)
writer = pd.ExcelWriter('样式%d%02d%02d.xlsx' %(t.year,t.month,t.day))
workbook = writer.book
fmt = workbook.add_format({"font_name": u"微软雅黑"})
percent_fmt = workbook.add_format({'num_format': '0.00%'})
amt_fmt = workbook.add_format({'num_format': '#,##0'})
border_format = workbook.add_format({'border': 1})
note_fmt = workbook.add_format(
{'bold': True, 'font_name': u'微软雅黑', 'font_color': 'red', 'align': 'left', 'valign': 'vcenter'})
date_fmt = workbook.add_format({'bold': False, 'font_name': u'微软雅黑', '