'What function of Google Spreadsheets create this black arrow in the top right corner of the cell
I'm trying to reproduce a spreadsheet and I can't seem to figure out what this little black arrow represents.
Any assistance would be greatly appreciated.
Solution 1:[1]
It's a note someone added. If you want to read it, hover your cursor over that cell and a pop-up blurb will show the note. If you want to delete it, right-click the cell and choose "Delete notes."
Solution 2:[2]
As pointed out by @Erik Tyler this is in fact a note (NOT a comment). This is important as you can add both to a cell using the UI, but you can only manipulate a note using Google Apps Script.
Here how you would add a note/ comment using the UI.
Here a comparison of a note and a comment. A note is black, a comment orange.
See them both expanded.
As mentioned above manipulating comments using Apps Script is not supported. There is a feature request for this, but it is not yet implemented and given its age it certainly does not seem to have any priority.
Now what you are actually trying to do is read/ write a note (No need for PNG magic as you commented earlier). This can be done with a script like the following. I am using the spreadsheet from above with the two cells My cell with note and My cell with comment.
function getAndSetNote(){
// get spreadsheet attached to this script
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
// get sheet using its name
const sheet = spreadsheet.getSheetByName("my-sheet");
// get the cell which contains the note
const cellWithNote = sheet.getRange(1, 1);
// log the current note
Logger.log(cellWithNote.getNote());
// set the new note
cellWithNote.setNote("This note was set using Apps Script!");
}
This little script will get the note, log it and set another note. Here the execution log of this script to show you it works.
And here the new note changed from This is a note to This note was set using Apps Script!.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Erik Tyler |
| Solution 2 | Mushroomator |






