一.dataframe存入Excel中: 注意:openpyxl打开的文件需是xlsx的后缀,因为比较新的. from openpyxl import load_workbook import pandas as pd def _excelAddSheet(dataframe,excelWriter,sheet_name): book = load_workbook(excelWriter.path) excelWriter.book = book dataframe.to_excel(exce
环境:MySQLdb openpyxl模块 python去zabbix的mysql数据库中取交换机不同时间段的进出口流量,然后写入excel中,每天cron执行,每周四邮件发送.(代码中第一行必须加上,不然crontab执行不了,或者在crontab时指明环境变量) #!/usr/local/bin/python2.7 #_*_coding:utf-8_*_ import MySQLdb import time from datetime import datetime from datetim