Note
See also Notes for worksheet and workbook note collections. Modern threaded comments use a separate Comment model.
- class Note
Represents a cell Note.
Before the introduction of threaded comments, a Note was called a Comment.
示例
import xlwings as xw book = xw.Book() cell = book.sheets[0]["A1"] note = cell.add_note("Review this value") print(note.text)
在 0.24.2 版本加入.
- property api: Any
Returns the native object (
pywin32orappscriptobj) of the engine being used.在 0.24.2 版本加入.
- async get_author()
Read the note's author from Excel; return
Noneif the note is gone.Requires xlwings Lite.
在 0.37.5 版本加入.
- 返回类型:
str | None
- async get_location()
Read the note's cell from Excel; return
Noneif it is gone.Requires xlwings Lite.
在 0.37.5 版本加入.
- 返回类型:
Range | None
- async get_text()
Fetch the note's text on demand.
Requires xlwings Lite.
在 0.37.0 版本加入.
- 返回类型:
str | None
- property location: Range
The cell containing this note. In xlwings Lite, use
await get_location().在 0.37.5 版本加入.