def Print(): wb = Workbook() sheet1 = wb.add_sheet("Sheet 1") sheet1.write(0, 0, "S.No.") sheet1.write(0, 1, "Student Roll No.") sheet1.write(0, 2, "First Name") sheet1.write(0, 3, "Last Name") sheet1.write(0, 4, "DOB") sheet1.write(0, 5, "Age") sheet1.write(0, 6, "Gender") sheet1.write(0, 7, "Address") sheet1.write(0, 8, "Mobile No.") for (row, i) in zip((stdDatabase_BackEnd.viewData()), range(1, 9)): sheet1.write(i, 0, row[0]) sheet1.write(i, 1, row[1]) sheet1.write(i, 2, row[2]) sheet1.write(i, 3, row[3]) sheet1.write(i, 4, row[4]) sheet1.write(i, 5, row[5]) sheet1.write(i, 6, row[6]) sheet1.write(i, 7, row[7]) sheet1.write(i, 8, row[8]) wb.save("Student Details.xls") messagebox.showinfo("Student Information System", "your details are saved!!", parent=master)
def DisplayData(): studentlist.delete(0, END) for row in stdDatabase_BackEnd.viewData(): studentlist.insert(END, row, str(""))