I have a Google Spreadsheet, column1 contains test_name
, and column two contains test result (pass or fail). I want to search the test_name
(string) in spreadsheet and if it matches, fetch the row, column of the string and update the result in column2.
try:
worksheet = sh.worksheet(sheetName)
print("got access to worksheet",worksheet)
except Exception as Ex:
print(Ex)
with open(PATH) as f:
for line in f:
if line.startswith("PASS") or line.startswith("FAIL") or line.startswith("SKIP") or line.startswith('INELIGIBLE') or line.startswith('ERROR'):
print("line",line)
index=line.index("")
result=line[0:index]
tname=line[index+1:]
print("result",result)
print(result+" "+ tname)
list1.append(tname)
print("*******************************")
try:
cell=sh.find(tname)
row=cell.row
column=cell.col
print("row",row)
print("col",col)
print("cell",cell)
except Exception as Ex:
print(Ex)
the cell.find(tname)
is showing error and not able to fetch case insensitive (or spacing) string.:
'Spreadsheet' object has no attribute 'cell'
I have fetch the exact row,col of the string.