I am trying to make python find a specific word in an excel sheet. Nonetheless, despite searching literally everywhere how to do this, I can't find an answer.
import re
with open('ptry.xlsx') as aa:
for line in aa:
match = re.search(r'abc', line)
if match:
print("yes")
else:
print ("no")
This code gives me the following result:
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
Repl Closed
Nonetheless, I am expecting a simple "yes" as the word "abc" is on my excel sheet.