javascript - How to place notes from different source sheet in Google Spreadsheets -
i've been struggling trying find method place information cell (a range of cells) comments in different cell (range of cell) in different sheet.
something this, if have apple in cell a1 in sheet1 want apple inserted comment in cell f1 in sheet 2.
i tried coming this.
//i'm still working on have not been able make work// //ideally put phone numbers comment's in 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);
as can read not working i've tried different methods none working come guys help.
the function "setnotes" takes 2 dimension array, value should setnotes([sourcenotes]). check documentation.
also if going set note 1 cell, recomend use function setnote. here example on function.
Comments
Post a Comment