I have an excel file, in which there are emails of users in column F. I would like to get the emails in each row and import into a django database. However; as I am very new to Django, I do not understand how to do it. Here is what I tried:
import openpyxl
from ms.common.models import User, Participant, Question, Answer
wb = openpyxl.load_workbook('list.xlsx')
ws = wb.get_sheet_names()
for row in ws.iter_rows('F{}:F{}'.format(ws.min_row,ws.max_row)):
for cell in row:
print cell.value
#create email
participant, created = Participant.objects.get_or_create(mail=user.username)