I need help on how to make a button after I choose a folder in dropdown list.
For Example: I have 3 folders name "Folder 1","Folder 2" & "Folder 3". Inside "Folder 1", I have 5 excel(.xlsx) files. So I need help on how to read and display the data in 1 excel(.xlsx) file.
My current situation: I choose "Folder 1" in the dropdown menu. The next thing that I need is a button which can open the "Folder 1" and display the other list of 5 excel(.xlsx) files. And then, I can choose one of the excel(.xlsx) file and display the data inside the gui.
Here is my code.... Help me :'(
import os
import tkinter as tk
from tkinter import ttk
#import tkinter as tk
from tkinter import filedialog, messagebox, ttk
folder = r'C:\Users\test folder'
filelist = [fname for fname in os.listdir(folder)]
master = tk.Tk()
master.geometry('1200x800')
master.title('Select a file')
optmenu = ttk.Combobox(master, values=filelist, state='readonly')
optmenu.pack(fill='x')
master.mainloop()