R Write to Excel With Links

后端 未结 2 1211
我在风中等你
我在风中等你 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: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)
    

提交回复
热议问题