:1.717KB : :1 :2021-12-26 19:45:12
ExceltoWord如果开发者对于本文件有需要的可以参考。
import xlrd
from docx import Document
from docx.enum.table import WD_TABLE_ALIGNMENT
import MySQLdb
def open_excel(filename='stu_info.xlsx'):
try:
data = xlrd.open_workbook(filename)
table = data.sheets()[0]
return table
except Exception, e:
print str(e)
return None