Question: 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.

Answer: 
There may be a better way, but this one does the trick. In the code below a copy of the excel file is created in a text format and then a list is created and checked for the "word" in the file. 

```
import pandas as pd

df = pd.read_excel("ptry.xlsx")
df.to_csv("ptry.txt")

filex = open("ptry.txt", "r")
filex_string = filex.read()
filex_list = filex_string.split(",")

if "word" in filex_list:
    print("True")
else:
    print("false")

```
```
import openpyxl

excel_var = openpyxl.load_workbook('excelname.xlsx')

sheet = excel_name.get_sheet_by_name('sheetname')

for row in sheet.iter_rows(min_row=minr, min_col=5, max_col=11, max_row=maxr):
    match = re.search(r'abc', line)
    if match:
        print("yes")
    else:
        print("no")

```

Take a note you should limit the rows and cols in the for loop there is a vars minr and maxr