使用tkinter和openpyxl导入excel

我想使用浏览button导入两个xlsx

这是我使用的代码:

app=Tk() def callback(): chart_path=askopenfilename() return file_location1=Button(app,text="TB v1",width=15, command=callback) file_location1.pack(side='top') file_location2=Button(app,text="TB v2",width=15, command=callback) file_location2.pack(side='top') wb1= openpyxl.load_workbook(file_location1) ws1= wb1.active wb2= openpyxl.load_workbook(file_location2) ws2=wb2.active 

但是,当我build立脚本,收到此错误:TypeError:参数应该是string,字节或整数,而不是button

有谁可以帮助我?