XmlMappedRange.Style 属性

获取或设置一个 Microsoft.Office.Interop.Excel.Style,它表示 XmlMappedRange 控件的样式。

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

语法

声明
Property Style As Object
    Get
    Set
Object Style { get; set; }

属性值

类型:System.Object
一个 Microsoft.Office.Interop.Excel.Style,表示 XmlMappedRange 的样式。

示例

下面的代码示例使用 Style 属性显示 XmlMappedRange 的当前样式的名称。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange

Private Sub DisplayStyle()
    Dim style1 As Excel.Style = CType(Me.CustomerLastNameCell.Style, Excel.Style)
    MsgBox("The current style of the XmlMappedRange is: " & style1.Name)
End Sub
private void DisplayStyle()
{
    Excel.Style style1 = (Excel.Style)this.CustomerLastNameCell.Style;
    MessageBox.Show("The current style of the XmlMappedRange is: " +
        style1.Name);
}

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间