-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExtraer_videos.py
56 lines (49 loc) · 1.66 KB
/
Extraer_videos.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# import openpyxl and tkinter modules
from openpyxl import *
from tkinter import *
wb = load_workbook("wb.xlsx")
sheet = wb.active
def focus0(event):
name_field.focus_set()
def focus1(event):
course_field.focus_set()
def focus2(event):
sem_field.focus_set()
def focus3(event):
form_no_field.focus_set()
def focus4(event):
contact_no_field.focus_set()
def focus5(event):
email_id_field.focus_set()
def focus6(event):
address_field.focus_set()
def clear():
name_field.delete(0, END)
course_field.delete(0, END)
sem_field.delete(0, END)
form_no_field.delete(0, END)
contact_no_field.delete(0, END)
email_id_field.delete(0, END)
address_field.delete(0, END)
def insert():
if (name_field.get()==""and
course_field.get()==""and
sem_field.get()==""and
form_no_field.get()==""and
contact_no_field.get()==""and
email_id_field.get()==""and
address_field.get()==""):
print("Empty Field")
else:
current_row = sheet.max_row
current_column = sheet.max_column
sheet.cell(row=current_row + 1, column=1).value = name_field.get()
sheet.cell(row=current_row + 1, column=2).value = course_field.get()
sheet.cell(row=current_row + 1, column=3).value = sem_field.get()
sheet.cell(row=current_row + 1, column=4).value = form_no_field.get()
sheet.cell(row=current_row + 1, column=5).value = contact_no_field.get()
sheet.cell(row=current_row + 1, column=6).value = email_id_field.get()
sheet.cell(row=current_row + 1, column=7).value = address_field.get()
wb.save("wb.xlsx")
name_field.focus_set()
clear()