1、 导入模块
import os
import datetime #定时发送,以及日期
import shutil #文件操作
import smtplib #邮件模块
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.header import Header
import time
import xlwt #excel写入
2、写入EXCEL
def eWrite(fLocate,file_sheet,file_subject,style0):
try:
if os.path.exists(fLocate):
os.remove(fLocate) # 如果文件存在,则删除
f = xlwt.Workbook(encoding='utf-8') #打开excel文件
fs = f.add_sheet(file_sheet) #sheet名
subject = list(file_subject) #列表化
for i in range(