Note
public sealed class Note
Namespace SharpCell · package SharpCell
A note on a cell: Excel's Insert Note (called a comment before Excel 365), shown in a box beside the cell, by default only while the pointer rests on it. Excel's threaded comments, with replies, are not notes; a file's own are kept when it is saved.
Constructors
Note(string, string)
public Note(string text, string? author = null)
A note with text, written by author.
Parameters
text: The note's text. Excel puts the author's name and a colon on the first line of a note it makes; SharpCell writes only the text it is given.author: Who wrote the note, or null for nobody. Excel shows it in the status bar while the pointer rests on the cell.
Exceptions
ArgumentNullException: The text is null.ArgumentException: The text is longer than 32,767 characters, as Excel allows.
Properties
Author
public string? Author { get; }
Who wrote the note, or null for nobody.
IsVisible
public bool IsVisible { get; init; }
Whether the note is always shown, as Excel's Show/Hide Note makes it; otherwise it is shown only while the pointer rests on its cell.
Text
public string Text { get; }
The text, with \n between lines.
Methods
Equals(Note)
public bool Equals(Note? other)
Whether the other note has the same text, author and visibility, compared ordinally.
Equals(object)
public override bool Equals(object? obj)
Whether obj is the same note.
GetHashCode()
public override int GetHashCode()
A hash code consistent with Note.Equals.
ToString()
public override string ToString()
The text.