1
有沒有辦法將程序鼠標懸停文字是這樣的:使用"look at 7:35 min"Excel的鼠標懸停文字與XLSX包
IM的XLSX包河
它沒有看任何幻想像在視頻中。我只是想讓一些文字出現在我懸停在「???」細胞。
有什麼建議嗎?
爲了讓你們開始:
library(xlsx)
write.xlsx("???",file="hoverText.xlsx",row.names = F,col.names = F)
wb <- loadWorkbook("hoverText.xlsx")
sheet <- getSheets(wb)
編輯:
添加評論(有點像懸停文本),但評論框的方式向小型化,文本我意圖寫。 (在Excel中我可以手動更改尺寸,讓我們試着找出A R的方式來改變註釋框的大小)
library(xlsx)
write.xlsx("???",file="hoverText.xlsx",row.names = F,col.names = F)
wb <- loadWorkbook("hoverText.xlsx")
sheet <- getSheets(wb)[[1]]
row <- xlsx::getRows(sheet)
cell <- xlsx::getCells(row, colIndex = 1)
comment <- "most foobar comment of all time\nhopefully with newline"
createCellComment(cell[[1]], string=comment, author=NULL, visible=TRUE)
saveWorkbook(wb,file="hoverText.xlsx")
EDIT2:
在網上搜索仍然沒有成功的小時後。它是與這些功能:
ClientAnchor anchor = factory.createClientAnchor();
anchor.setCol1(cell.getColumnIndex()); anchor.setCol2(cell.getColumnIndex() + 1);
anchor.setRow1(cell.getRowIndex()); anchor.setRow2(cell.getRowIndex()+ 1);
anchor.setDx1(100);
anchor.setDx2(100);
anchor.setDy1(100);
anchor.setDy2(100);
沒有爲評論框自動調整大小
CELL.Comment.Shape.TextFrame.AutoSize = True
不知道還如何在Excel中自R