can read otp
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@ from pojo.contact_pojo import ContactPojo
|
||||
|
||||
class ExcelReader:
|
||||
# read the contact list from the exel file
|
||||
def read_file(self) -> list:
|
||||
def read_contacts(self) -> list:
|
||||
contact_list_in_json = pandas.read_excel(r'./contact.xlsx').to_json(orient='records')
|
||||
contact_dict_list = json.loads(contact_list_in_json)
|
||||
contact_list = []
|
||||
@@ -19,12 +19,12 @@ class ExcelReader:
|
||||
last_name=last_name,
|
||||
first_name=first_name,
|
||||
ccid=contact_dict['ccid'],
|
||||
passport_number=contact_dict['passport'])
|
||||
passport_number=contact_dict['passport'], mail=contact_dict['email'])
|
||||
contact_list.append(contact)
|
||||
return contact_list
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
reader = ExcelReader()
|
||||
data = reader.read_file()
|
||||
data = reader.read_contacts()
|
||||
print(data)
|
||||
|
||||
Reference in New Issue
Block a user