← 输入框|github.com|刷新
Skip to content

Add lazy legacy cell comment support - #775

Merged
appel1 merged 1 commit into
developfrom
issue292
Oct 24, 2026
Merged

appel1 merged 1 commit into
developfrom
issue292

Conversation

@appel1

@appel1 appel1 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

dds  GetComment(int columnIndex)  to read legacy cell comments (notes) from the current row in XLS, XLSX, XLSB and SpreadsheetML.

  • Returns an immutable  CellCommentThread  containing author and plain-text messages. Legacy notes contain one message; the API allows threaded comments to be added later without changing its signature.
  • Loads comments only on first access and caches them per worksheet. Ordinary reading does not decode or store comments, and cached lookups allocate no memory.
  • Preserves active buffered readers during lazy loading, including encrypted XLS files. Comments do not change cell values, row counts or field counts.
  • Resolves OpenXML comments through package relationships, supports rich-text flattening and older BIFF note continuations, and reports malformed supported comment data on access.

Modern threaded comments, rich-text formatting, note layout and automatic DataSet export are not included. CSV returns  null .

Fixes #292

Expose immutable author and plain-text messages through GetComment for XLS, XLSX, XLSB and SpreadsheetML. Load notes only on demand, preserve active buffered readers during auxiliary scans, and cache notes across worksheet revisits.

Cover format decoding, encrypted streams, lifecycle and malformed records; document the API and add comment benchmarks.

Fixes #292

Fixes #408

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@appel1
appel1 merged commit 620c199 into develop Oct 24, 2026
4 checks passed
@appel1
appel1 deleted the issue292 branch October 24, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reading a Cell's Comment

1 participant