This documentation is archived and is not being maintained.

NamedRange.Creator Property

Gets a 32-bit integer that indicates the application in which the NamedRange control was created.

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

public XlCreator Creator { get; }

Property Value

One of the XlCreator values.

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

The following code example creates a NamedRange and then uses the Creator property to determine whether the NamedRange was created in Microsoft Office Excel.

Microsoft.Office.Tools.Excel.NamedRange displayCreatorRange;
private void DisplayCreator()
    displayCreatorRange = this.Controls.AddNamedRange(
        this.Range["C3", "E5"], "displayCreatorRange");
    if (this.displayCreatorRange.Creator == 
        MessageBox.Show("This NamedRange control was created in " +
            "Microsoft Office Excel.");
        MessageBox.Show("This NamedRange control was not created in " +
            "Microsoft Office Excel.");