python3導入excel 原

import xlrd doc = xlrd.open_workbook(r'd:\test.xlsx') table = doc.sheets()[0] # A1=table.cell(0, 0).value sql = "insert into sys_user values('{name}',{age});" for i in range(1, table.nrows): Ax, Bx = table.row_values(i) print(sql.format(name=Ax, age=Bx))
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章