@ravikumar_bavigadda wrote:
Need help in R
I have sales data in excel file in that i have to open sheet3
i tried below code but unable to give hyperlinks to that sheet3
library(xlsx)
wb <- createWorkbook()
sheet1 <- createSheet(wb, "Sheet1")
rows <- createRow(sheet1)
cells <- createCell(rows)
links <- c("[D://r datasets/sales data.xlsx]sheet3!")
names(links) <- c("link1")
for (row in 1:length(links)) {
setCellValue(cells[[row,1]], names(links)[row])
addHyperlink(cells[[row,1]], links[row])
}
saveWorkbook(wb, "hyperlinks to file.xlsx")
shell.exec("hyperlinks to file.xlsx")
Can anyone help in this regard
Thanks in advance
Posts: 1
Participants: 1