Hello, is everything good? I am a beginner in Python and would like to run a script that given a spreadsheet in excel, the user could search for a word within that worksheet and if the word was found return "Found File and display all lines. For example, my worksheet:
NameAgeheightDanilo271.62John351.75Maria231.85Thalita251.80
TheuserlookingforDanilo,wouldliketheprogramtoreturn:FileFoundandNameAgeheightDanilo271.62
Followmycode:
fromxlrdimportopen_workbookworkbook=open_workbook("c:/Python34/test.xlsx")
sheet = workbook.sheet_by_index(0)
prompt = '>'
print ("Entre com o termo a ser buscado: ")
item = input(prompt)
found = False
for cell in sheet.col(0):
if cell.value == item:
found = True
if found == True:
print('Arquivo Encontrado', item) # tentei colocar (cell) mas dá errado
else:
print('Arquivo não Encontrado')
Thank you