2019-04-22
阅读量:
538
python如何使用Tkinter
Python提供了Tkinter工具包来开发GUI应用程序。现在,它取决于开发人员的想象力或必要性,他/她想要使用此工具包开发什么。让我们使用Tkinter制作一个简单的信息表格GUI应用程序。在此应用程序中,用户必须填写所需信息,并将该信息自动写入excel文件。
首先,创建一个空的excel文件,然后在程序中传递excel文件的绝对路径,以便程序能够访问该excel文件。
# import openpyxl and tkinter modules
from
openpyxl import
*
from
tkinter import
*
# globally declare wb and sheet variable
# opening the existing excel file
wb =
load_workbook('C:\\Users\\Admin\\Desktop\\excel.xlsx')
# create the sheet object
sheet =
wb.active






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论