-1

i would like to retrieve a cell value from gspread python API, however, the cell method "sheet.acell(A)" returns a value like this sheet.acell(A) i have proposed a forced solution in a way. is there a more efficient way to handle this

      def cellfinder(A):
            cell =str(sheet.acell(A))
            for x in cell:
               if x=="'":
                 f=cell[cell.index("'")+1:len(cell)-2]
                 return f

thank you

nvrthles
  • 99
  • 1
  • 1
  • 6

1 Answers1

2

I think you already might have figured this out, but in case if you didn't, it should be:

cell = sheet.acell('B1').value
pppery
  • 3,731
  • 22
  • 33
  • 46
seeker407
  • 43
  • 7