Skip to end of metadata
Go to start of metadata

Description

A NamedObject object may refer to an array, number, picture, or range. To create a NamedObject in an Excel file, use the corresponding method for the specific object you wish to create (Pictures.CreatePicture(), Workbook.CreateRange(), etc). To get a NamedObject from an existing file, use Workbook.GetNamedObject(), passing in the name of the object you wish to get.

C#
vb.net

Examples

The following sample gets a NamedObject from a Workbook.

C#
vb.net

Properties

Name

Description

Formula

If the NamedObject refers to a named range, Formula returns the formula associated with the range, e.g. "=Sheet1!A1:G10".

Name

Returns the name string that the specified NamedObject object represents.

NamedObjectType

Returns the type of object that the NamedObject refers to.

NameScope

Returns the scope of the name, relative to the Excel workbook.

Value

Returns the object referenced by this NamedObject. The object may be of any of the following types: Range, Picture, Array, Number. To determine the object type, use NamedObject.Type.

Nested Classes

Name

Description

BuiltInName

The BuiltInName class contains all built-in object names.

ReturnType

A ReturnType value specifies the type of object a NamedObject refers to.

Scope

A Scope value specifies the scope of the object that a NamedObject refers to.

Remarks

Named objects with type ReturnType.Range can also be accessed (as Range objects) through the Workbook.GetNamedRange and Worksheet.GetNamedRange methods. These objects will change their value like other ranges in response to adding or deleting rows, and other similar actions.

Named objects with type ReturnType.Formula and ReturnType.ExternalReference, though they may contain formulas with cell references, will not respond to such actions.

  • No labels