Comment
- class Comment
A modern threaded comment attached to one cell, distinct from a Note.
Examples
import xlwings as xw cell = xw.Book().sheets[0]["A1"] comment = cell.add_comment("Review this value") comment.text = "Review the updated value" print(comment.author, comment.text) comment.delete()
- property creation_date: datetime | None
Creation date, when Excel has one. In xlwings Lite, use
await get_creation_date().
- async get_creation_date()
Read the creation date.
Requires xlwings Lite.
- Return type:
datetime | None
- async get_location()
Read the comment’s cell.
Requires xlwings Lite.
- Return type:
Range | None
- async get_replies()
Fetch replies.
Requires xlwings Lite.
- Return type:
list[CommentReply]
- async get_text()
Read the comment text, or
Noneif it was deleted.Requires xlwings Lite.
- Return type:
str | None
- property location: Range
The comment’s cell. In xlwings Lite, use
await get_location().
- property replies: list[CommentReply]
Replies to this comment. In xlwings Lite, use
await get_replies().