import xlrd
import re

workbook=xlrd.open_workbook('planningSpreadSheet_20140120T124023_20140203-20140209.xls')

sh=workbook.sheet_by_index(0)


palabras=str(sh)

for col in range(sh.ncols):
    for i in range(sh.nrows):
        caca=sh.row_values(i)
        print(caca)

Hi , i try to do a seeker, read an xls file ,and find a word,(input()),and show all the content of the row

Why is line 11 (for col...) there? Shouldn't you just iterate over all the rows? Notice you don't use col anywhere in the program.

I think caca ends up being a list of all the cell values in row i. In which case, after line 13, you would want something like if myword in caca:, and indent line 14.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.