循环导出所有行和列 def export_excel(table_name): host,user,passwd,db='192.168.0.12','root','myjcyf','us_sys' coon=pymysql.connect(host=host,user=user,passwd=passwd,db=db,port=3306,charset='utf8') cur=coon.cursor() #建立游标 sql='select * from %s;'%table_name cur.…