Merge branch 'feature/automatic' into feature/auto_with_checkresults
This commit is contained in:
@@ -7,8 +7,9 @@ import xlsxwriter
|
||||
|
||||
from definitions import CONTACT_LIST_FILE
|
||||
from pojo.contact_pojo import ContactPojo
|
||||
from utils.generate_random_passport_id import get_random_passport_id_number
|
||||
|
||||
phone_number_prefix = ['6', '7']
|
||||
phone_number_prefix = ['6']
|
||||
|
||||
|
||||
class ExcelHelper:
|
||||
@@ -122,7 +123,7 @@ def write_new_contacts_to_excel(valid_contacts: list):
|
||||
row = row + 1
|
||||
for info in valid_contacts:
|
||||
info.phone = get_random_phone_numbers()
|
||||
info.passport = get_random_id_number()
|
||||
info.passport = get_random_passport_id_number()
|
||||
info.mail = generate_email_from_name(info.first_name, info.last_name)
|
||||
# Iterate over the data and write it out row by row.
|
||||
worksheet.write(row, col, "{} {}".format(info.last_name, info.first_name))
|
||||
@@ -135,6 +136,6 @@ def write_new_contacts_to_excel(valid_contacts: list):
|
||||
|
||||
if __name__ == '__main__':
|
||||
excel_reader = ExcelHelper()
|
||||
contacts = excel_reader.read_names("C:/Users/landd/Downloads/names.xlsx")
|
||||
contacts = excel_reader.read_names("C:/Users/landd/Desktop/rdv/08-06/500.xlsx")
|
||||
print(contacts)
|
||||
write_new_contacts_to_excel(valid_contacts=contacts)
|
||||
|
||||
Reference in New Issue
Block a user