Skip to content
本页内容

Delete (方法)

删除对象。

示例

python
#本示例删除 A1 单元格的批注
def test():
    Range("A1").Comment.Delete()
python
#本示例遍历活动工作表上所有批注,并删除该工作表中由 jack 添加的所有批注
def test():
    comments = Application.ActiveSheet.Comments
    for c in range(1, comments.Count):
        if comments.Item(c).Author == "jack":
            comments.Item(c).Delete()