I'm trying to search for a username -within a xlsx- 'saito' (I added this to the xslx manually) and most of the answers online work only when you search for a specific cell. My intention is to make a login program where I can search for a username and if the username exists in the file then ask for the related password after, still can't find out how to search for a string though.
Below is my current code...
counter = 0
print('type L to log in or C to create an account')
decision = input().lower()
if decision == 'l':
while counter == 0:
print('please enter your user name')
username = input()
while username == '':
print('please enter a valid username')
username = input()
if username in Accounts.xlsx:
print('please enter your password')
counter = counter + 1
else:
print('The username you have entered has not been recognised, please try again')
elif decision == 'c':
print('I'll do the user creation later')
else:
print('please log in or create a user')
Accounts.xlsx is the file I will be using to search for the usernames.