import openpyxl
file = openpyxl.load_workbook ("C: \ Users \ ysatish \ Documents \ LoginData.xlsx")
sheet = file.active
Dict = {}
class Excl:
@staticmethod
def testCase():
for i in range(1, sheet.max_row + 1):
for j in range(1, sheet.max_column + 1):
Dict[sheet.cell(row=1, column=j).value] = sheet.cell(row=i, column=j).value
return [Dict]
print (Excl.testCase ())