¿Cómo puedo agregar un comentario a la hoja de Google usando el script de la aplicación? Puedo agregar notas pero quiero agregar comentarios. Intenté diferentes métodos pero ni idea.
.setcomentarios
y
.getcomments
función ni siquiera existe.
Logro agregar un comentario con:
function insertDriveComment(){ var fileId = 'your file id' var resource = {'content': 'Here is my comment !'}; Drive.Comments.insert(resource, fileId) }tienes que habilitar el servicio Drive API
o, si usa la misma hoja de cálculo para agregar comentarios
function insertDriveComment(){ var fileId = SpreadsheetApp.getActiveSpreadsheet().getId() var resource = {'content': 'Here is my comment !'}; Drive.Comments.insert(resource, fileId) }