Search code examples
pythongoogle-sheets-apigspread

how to retrieve hyperlinks in spreadsheet cells using gspread?


I am not able to retrieve hyperlinks in google spreadsheet cells using gspread. I am always returned the text of the cell and not the hyperlink itself.

I have attempted

worksheet.cell(i, j, value_render_option="FORMULA")

with all the three possible options for value_render_option and none of them works.

I have seen some old answers here about using input_value, that unfortunately is not supported anymore


Solution

  • If your cell content is something like

    =HYPERLINK("http://www.wikipedia.de","wikipedia")

    try

    cell = worksheet.cell(i, j, value_render_option='FORMULA').value