[英]How to rename Google spreadsheets (files) and populate their contents with values from a sheet
[英]How to place notes from different source sheet in Google Spreadsheets
我一直在努力尋找一種方法來將單元格(單元格范圍)中的信息作為注釋放置在不同工作表中的其他單元格(單元格范圍)中。
像這樣,如果我在Sheet1的A1單元格中有Apple,我希望將Apple作為注釋插入到Sheet 2的Cell F1中。
我試圖提出這樣的事情。
//I'm still working on this I have not been able to make this work//
//Ideally this will put the phone numbers as comment's in the needed cases//
var ss = SpreadsheetApp.getActiveSpreadsheet();
var targetsheet = ss.getSheetByName("report");
var sourcesheet = ss.getSheetByName("Sheet1");
var nrange = sourcesheet.getRange(2, 3, sourcesheet.getLastRow(), 1)
var sourcenotes = [nrange.getValue()]
var notes = targetsheet.getRange(2, 6, sourcesheet.getLastRow(),1)
notes.setNotes(sourcenotes);
如您所見,這沒有用,我嘗試了不同的方法,但是沒有用,所以我向你們尋求幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.