Skip to content

NotesManager

add(sheetName, note): Note;

Add a new note to a cell on the given sheet.

string

Note

Note

the created Note (defensive copy)

if the sheet does not exist

if ref is not a valid cell reference

if text is empty

if author is empty

if a note already exists on the target cell


delete(sheetName, ref): void;

Delete a note from the given sheet.

string

string

void

if the sheet does not exist

if no note exists at the given ref


get(sheetName): Note[];

Get all notes on the given sheet.

Copies are returned to prevent external mutation of the sheet’s notes.

string

name of the sheet

Note[]

if the sheet does not exist


getByCell(sheetName, ref): Note | undefined;

Get the note attached to a specific cell on the given sheet.

string

name of the sheet

string

cell reference in A1 notation

Note | undefined

the note (defensive copy) or undefined if no note exists

if the sheet does not exist


update(
sheetName,
ref,
updates): void;

Update an existing note on the given sheet. Only provided fields are updated; omitted fields are left unchanged. ref itself is not changed by this API; cell moves are handled by updateAnnotationRefs.

string

string

Partial<Pick<Note, "text" | "author">>

void

if the sheet does not exist

if ref is not a valid cell reference

if no note exists at the given ref