How to get the co-ordinate of a cell in gspread by using cell value in Python 3.6

时间:2017-12-15 11:28:38

标签: python gspread google-sheets-query

All I have the value of a cell and I want to know the coordinates of the cell in Gspread.

Suppose I have date "12-11-2017". How can I find the coordinates of the cell that has this date? I am using python 3.6 with Gspread

1 个答案:

答案 0 :(得分:0)

试试这个:

cell = worksheet.find("12-11-2017") #Find a cell with exact string value
print("Text found at R%sC%s" % (cell.row, cell.col))

Documentation可能是找到所需内容的好方法