1
要求是我必须在有很多工作表的工作表中创建索引,因此从索引表我可以直接导航到目标。将文本添加到Google电子表格中作为超链接
我写了下面的脚本
// custom menu function
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.addItem('toTablrOfContent','toTablrOfContent')
.addToUi();
}
// function to write selected cell data to index sheet
function toTablrOfContent() {
var selectdCellData = SpreadsheetApp.getActiveSpreadsheet().getActiveCell().getValue();
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[11]; // 11 is the index sheet
sheet.appendRow([selectdCellData]);
该脚本将所选单元格的数据发送到的“指标”表 最后一排,但我不能够插入这是一个超链接到选定的单元格。这可以做到吗?
感谢@OblongMedulla:我的要求是有点不同,在这里我想创建链接到同一工作表单元格的一些,不一些URL。但它仍然有帮助。 –