是否可以使用 Google Spreadsheet API 在单元格中添加注释? [英] Is it possible to use the Google Spreadsheet API to add a comment in a cell?
本文介绍了是否可以使用 Google Spreadsheet API 在单元格中添加注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在查看 CellEntry API (https://developers.google.com/gdata/javadoc/com/google/gdata/data/spreadsheet/CellEntry) 以了解如何添加评论(最好还添加注释)) 到一个单元格,但看不到任何明显的东西,如addComment()".
I am looking at the CellEntry API (https://developers.google.com/gdata/javadoc/com/google/gdata/data/spreadsheet/CellEntry) to see how I could add comments (and ideally notes as well) to a cell, but don't see anything obvious like "addComment()".
有人有想法吗?
谢谢
推荐答案
借助 google sheet API v4,您可以使用电子表格.batchUpdate 设置备注.javascript sdk 示例:
With google sheet API v4 you can set a note using spreadsheets.batchUpdate. Example javascript sdk:
var requests = [];
requests.push({
"repeatCell": {
"range": {
"sheetId": yourSheetId,
"startRowIndex": 1,
"endRowIndex": 2,
"startColumnIndex": 0,
"endColumnIndex": 1
},
"cell": {
note: "Your note"
},
"fields": "note"
}
});
gapi.client.sheets.spreadsheets.batchUpdate({
spreadsheetId: yourDocumentId,
requests: requests
}).then(function(response) {
console.log(response);
callback();
});
这篇关于是否可以使用 Google Spreadsheet API 在单元格中添加注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文