#!/usr/bin/python
# -*- coding: UTF-8 -*-
import datetime
import MySQLdb
import os
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
#os.system('source /etc/profile')
import sys
import xlwt
import xlrd
import smtplib
from time import strftime, localtime
from datetime import timedelta, date
import calendar
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.header import Header
#sys.path.append('/usr/lib64/python2.6/site-packages/cx_Oracle.so')
# 打开数据库连接
mydb = MySQLdb.connect("10.18.141.52","dba","xxxxxxxxxx","ys" )
print "mydb"
#exit(1)
# 使用cursor()方法获取操作游标
mycursor = mydb.cursor()
mycursor.execute('SET CHARACTER SET utf8;')
mycursor.execute('SET NAMES utf8;')
mycursor.execute('SET character_set_connection=utf8;')
sql1 = " CALL ys.pr_get_increament_report_by_plat_class1();"
col
python 多sheet页写入excel并发邮件
最新推荐文章于 2022-09-01 19:59:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)