Jul-12-2020, 03:48 PM
(Jul-12-2020, 02:41 PM)aidanh26 Wrote: I appreciate you taking the time to have a look so thank you!!
Just as an fyi.....before I added in the section below, it would successfuly email a given address. The section below seems to have an adverse affect however I do require the email address to be sourced from an excel file.
loc = ("NumberPlateList.xlsx") wb = xlrd.open_workbook(loc) sheet = wb.sheet_by_index(0) sheet.cell_value(0, 0) scannedNumberPlateNumber = ('202-G-5679') for i in range(sheet.nrows): if sheet.cell_value(i, 0) == scannedNumberPlateNumber: print('Found in column A - ignore') if sheet.cell_value(i, 2) == scannedNumberPlateNumber: print('Found in column C - send email to ' + sheet.cell_value(i, 3) )
Hmm that is interesting. Can you send me the entire code similar to the first submission (obvs. not including credentials) but including calls to functions etc?
I'll see if i can debug,
Harley