共用方式為


XmlMappedRange.Creator Property

Gets a value that indicates the application in which this XmlMappedRange control was created.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
ReadOnly Property Creator As XlCreator
XlCreator Creator { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.XlCreator
One of the XlCreator values.

Remarks

Because the XmlMappedRange control was created in Microsoft Office Excel, this property returns the string XCEL, which is equivalent to the hexadecimal number 5843454C.

Examples

The following code example uses the Creator property to determine whether an XmlMappedRange was created in Microsoft Office Excel. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub DisplayCreator()
    If Me.CustomerLastNameCell.Creator = Excel.XlCreator.xlCreatorCode Then
        MsgBox("This XmlMappedRange was created in " & _
            "Microsoft Office Excel.")
    Else
        MsgBox("This XmlMappedRange was not created in " & _
            "Microsoft Office Excel.")
    End If 
End Sub
private void DisplayCreator()
{
    if (this.CustomerLastNameCell.Creator == Excel.XlCreator.xlCreatorCode)
    {
        MessageBox.Show("This XmlMappedRange was created in " +
            "Microsoft Office Excel.");
    }
    else
    {
        MessageBox.Show("This XmlMappedRange was not created in " +
            "Microsoft Office Excel.");
    }
}

.NET Framework Security

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace