R Write to Excel With Links

后端 未结 2 1176
我在风中等你
我在风中等你 2021-01-06 22:23

I\'m wondering how can I export an r dataframe to excel format file, with some links embeded. So that I can use R to create an xlsm file. When open xlsm file, I can click ce

相关标签:
2条回答
  • 2021-01-06 23:01

    The xlsx package has the function addHyperlink, for exactly this purpose. example(addHyperlink) should get you started.

    0 讨论(0)
  • 2021-01-06 23:13

    The modern way is probably to use the openxlsx package. See the documentation for ?makeHyperlinkString as follows:

    x <- c("https://www.google.com", "https://www.google.com.au")
    names(x) <- c("google", "google Aus")
    class(x) <- "hyperlink"
    
    writeData(wb, sheet = 1, x = x, startCol = 10)
    
    0 讨论(0)
提交回复
热议问题