0

Please Help, how to convert comment's value to cell's value using google script?

This is the comment, and i want to getValue that comment, and setValue to each cell:

1st Picture: https://i.stack.imgur.com/oecno.png]

2nd Picture: https://i.stack.imgur.com/OPo6t.png

Toto
  • 89,455
  • 62
  • 89
  • 125
  • Does this answer your question? [How to GetComments from google sheets](https://stackoverflow.com/questions/40839057/how-to-getcomments-from-google-sheets) – mshcruz Jul 15 '21 at 10:38

2 Answers2

0

Try this? Select cell with comment and run code.

function moveComment() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet();
  var cell = sheet.getActiveCell();
  var comments = cell.getComment();
  cell.setValue(comments);
  cell.setComment("");
}
SMESheets
  • 3
  • 2
0

At this time, Google Apps Script cannot do exactly what you want: access a comment for a specific cell of your choosing. It also cannot determine what cell a comment is attached to.

You can see question 15556476 for additional information. Even better, please go star Google's Issue 36756650, and hopefully that will prompt them to release this functionality we all want.

There aren't any references to Comments within the current API for Spreadsheet ranges. And, in the Drive Comments API, the "anchor" property does not work with Spreadsheets. (Also see question 56544407.)

Jon Freed
  • 156
  • 12