SharpCell

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

Exceptions

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.