主题
Comment (属性)
返回或设置与名称关联的批注。可读/写 str 类型。
说明
批注文本不能超过 255 个字符。
示例
python
#本示例在活动工作簿中为名称“test”添加备注
def test():
ActiveWorkbook.Names.Item("test").Comment = "名称备注"
python
#本示例显示 Sheet1 中名称为“test1”的备注
def test():
name = Application.Worksheets.Item("Sheet1").Names.Item("test1")
print(name.Comment)