簡體   English   中英

是否有使用Google-Apps-Script在Google表格中選擇新單元格的功能?

[英]Is there a function to select a new cell in Google Sheets using Google-Apps-Script?

調用函數(makeActive)時,我需要Google工作表來選擇特定的單元格(B3)。 應該選擇該單元格,就像用戶自己單擊該單元格一樣。

正如文檔所說的那樣簡單:

// The code below sets the cell B5 in the first sheet as the current cell.
var cell = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0].getRange('B5');
SpreadsheetApp.setCurrentCell(cell);

var selection = SpreadsheetApp.getSelection();
// Current cell: B5
var currentCell = selection.getCurrentCell();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM