googlesheets4 icon indicating copy to clipboard operation
googlesheets4 copied to clipboard

Deal with hyperlinks

Open jennybc opened this issue 4 years ago • 7 comments

Consider a cell that holds a hyperlink. Currently we just import the link text, unless we get full cell data. Figure out if there's some intermediate that makes it easier to get the URLs. Need to also investigate the case of cell text that is only partially a hyperlink.

jennybc avatar Jun 17 '20 04:06 jennybc

I would also like to be able to write hyperlinks to google sheets.

allenbaron avatar Jun 23 '21 21:06 allenbaron

Ditto! Is there any known workaround to writing hyperlinks to sheets? Wrapping the text as <a href="{URL}">{URL}</a> didn't help, e.g.

MichaelChirico avatar Dec 01 '21 18:12 MichaelChirico

I think I really have to implement hyperlinks properly to get this (?). I don't personally know of a workaround off the top of my head.

jennybc avatar Dec 01 '21 19:12 jennybc

At least for writing, it looks like =HYPERLINK("{URL}") is the way to link a cell... unfortunately write_sheet() escapes it by prepending '

MichaelChirico avatar Dec 01 '21 19:12 MichaelChirico

I can't test this myself right now, but maybe try writing that as a formula.

https://googlesheets4.tidyverse.org/articles/write-sheets.html#write-formulas

jennybc avatar Dec 01 '21 20:12 jennybc

Ah that's wonderful! Thanks!!! Solves my issue, which is narrower than that of this issue overall.

MichaelChirico avatar Dec 01 '21 21:12 MichaelChirico

I would like this feature to also be available to read a google sheet data with hyperlinks and write it to other sheets with them.

benyamindsmith avatar Sep 15 '23 19:09 benyamindsmith