Python 使用 openpyxl 将Excel数据 导入MySQL数据库中

最近有个项目需要Python 的openpyxl 插件将Excel数据 导入MySQL数据库中,可是以前都没有接触过Python,所以是个小白。。
下面是Excel和代码
图片说明
Python code:

-*- coding: utf-8 -*-

from openpyxl.reader.excel import load_workbook as lw
import pymysql
db = pymysql.connect("localhost","root","1234","test") #地址,用户名,密码,数据库名

使用 cursor() 方法创建一个游标对象 cursor

cursor = db.cursor()
insert_sql = 'insert into employee (LAST_NAME, FIRST_NAME, AGE, SEX, INCOME) values (%s, %s, %s, %s, %s)'
wb = lw(filename = 'c:\test.xlsx')
ws = wb.get_sheet_by_name(wb.get_sheet_names()[0]) #
rows = ws.max_row # 最大行数
columns = ws.max_column # 最大列数
data = []
for rx in range(1, rows+1):
for cx in range(1, columns+1):
data.append(str(ws.cell(row=rx, column=cx).value))
cursor.execute(insert_sql, (data[0], data[1], data[2], data[3], data[4]))
data = []
db.commit() # 提交

关闭两个连接

cursor.close()
db.close()
图片说明
有一个问题就是,当excel表格里有中文的时候,代码运行就会报错:
图片说明
网上试了很多解码的方法,都没能解决这个问题,而且,从mysql读数据的时候,print出来的中文显示是??(问号),也用了解码的代码了,但是没有解决。。求大神指点我这个小白。。感激不尽~~网上的各种方法都看过了,希望可以针对这个问题作出针对性的回答。
PS:Python 版本:3.5.2

报的错是不能将"latin-1"转成。。。,"latin-1"是不支持中文的,你将编译器默认的语言改成utf-8试一试

将excel整理的表结构生成insert建表sql:https://download.csdn.net/download/gongjin28_csdn/85486975