'Searching the string and getting the row and column value
How to search the particular string in the excel sheet and getting the row and column value of that particular string in the excel sheet using xlrd in python? Can any one help me please?
import xlrd
workbook = xlrd.open_workbook("1234.xls")
worksheet = workbook.sheet_by_name('firstpage')
only this much i tried
Solution 1:[1]
Say you're searching for a string s:
for row in range(sh.nrows):
for column in range(sh.ncols):
if s == sh.cell(row, column).value:
return (row, column)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | frogbandit |
