Python Forum
[Tkinter] Data from Excel GUI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Data from Excel GUI
#1
I`m beginner in Python, could you please help to adopt the script above and add my df:

https://python-forum.io/Thread-Tkinter-P...#pid124474

import os
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
 
root = Tk()
root.title("GUI")
ttk.Label(root, text="Add Excel File :").grid(row=0, column=0, padx=20, pady=20)
open_file = ttk.Button(root, text="Open files")
open_file.grid(row=0, column=1, columnspan=2, padx=20, pady=20)
ttk.Label(root, text="Name Excel :").grid(row=1, column=0, padx=20, pady=20)
box_red_path = ttk.Label(root, text="")
box_red_path.grid(row=1, column=1, columnspan=4, padx=20, pady=20)
stare_scripte = ttk.Button(root, text="Start")
stare_scripte.grid(row=3, column=2, columnspan=2, padx=20, pady=20)
 
def upload_excel():
 
    filename = filedialog.askopenfilename(title="Select a File", filetype=(("Excel", "*.xlsx"), ("Excel", "*.xls")))
 
    path = filename
 
    box_red_path.configure(text=path)
open_file.config(command=upload_excel)
 
def start_app():
    print('app running')
 
stare_scripte.config(command=start_app)
root.mainloop()
I need add the script below:

df = pd.read_excel(GET EXCEL FILE, header=0, usecols = 'A, B, C', skiprows = 2)
GET EXCEL FILE = File from Tkinter.
Reply


Messages In This Thread
Data from Excel GUI - by maaad - Aug-31-2020, 04:21 PM
RE: Data from Excel GUI - by Larz60+ - Aug-31-2020, 04:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Append Data from TkInter to Excel zinho 5 19,062 Feb-16-2017, 01:47 PM
Last Post: johnathon

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020