XmlMappedRange.Comment 属性

获取一个 Comment,它表示与 XmlMappedRange 控件的左上角中的单元格相关联的注释。

命名空间:  Microsoft.Office.Tools.Excel
程序集:  Microsoft.Office.Tools.Excel(在 Microsoft.Office.Tools.Excel.dll 中)

语法

声明
ReadOnly Property Comment As Comment
    Get
Comment Comment { get; }

属性值

类型:Microsoft.Office.Interop.Excel.Comment
一个 Comment,表示与 XmlMappedRange 控件的左上角中的单元格相关联的注释。

示例

下面的代码示例使用 AddComment 方法将一条注释添加到 XmlMappedRange 中,然后使用 Comment 属性改变注释文本。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange

Private Sub AddComment()
    Me.CustomerLastNameCell.AddComment("Text to be replaced.")
    Me.CustomerLastNameCell.Comment.Text( _
        "This range contains customer last names.")
End Sub
private void AddComment()
{
    this.CustomerLastNameCell.AddComment("Text to be replaced.");
    this.CustomerLastNameCell.Comment.Text(
        "This range contains customer last names.", 
        missing, missing);
}

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间