Excel.Interfaces.NamedItemData interface

An interface describing the data returned by calling namedItem.toJSON().

Properties

arrayValues

Returns an object containing values and types of the named item.

comment

Specifies the comment associated with this name.

formula

The formula of the named item. Formulas always start with an equal sign ("=").

name

The name of the object.

scope

Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook.

type

Specifies the type of the value returned by the name's formula. See Excel.NamedItemType for details.

value

Represents the value computed by the name's formula. For a named range, it will return the range address. This API returns the #VALUE! error in the Excel UI if it refers to a user-defined function.

valueAsJson

A JSON representation of the values in this named item. Unlike NamedItem.value, NamedItem.valueAsJson supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use NamedItem.valueAsJsonLocal.

valueAsJsonLocal

A JSON representation of the values in this named item. Unlike NamedItem.value, NamedItem.valueAsJsonLocal supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use NamedItem.valueAsJson.

visible

Specifies if the object is visible.

Property Details

arrayValues

Returns an object containing values and types of the named item.

arrayValues?: Excel.Interfaces.NamedItemArrayValuesData;

Property Value

Remarks

[ API set: ExcelApi 1.7 ]

comment

Specifies the comment associated with this name.

comment?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.4 ]

formula

The formula of the named item. Formulas always start with an equal sign ("=").

formula?: any;

Property Value

any

Remarks

[ API set: ExcelApi 1.7 ]

name

The name of the object.

name?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.1 ]

scope

Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook.

scope?: Excel.NamedItemScope | "Worksheet" | "Workbook";

Property Value

Excel.NamedItemScope | "Worksheet" | "Workbook"

Remarks

[ API set: ExcelApi 1.4 ]

type

Specifies the type of the value returned by the name's formula. See Excel.NamedItemType for details.

type?: Excel.NamedItemType | "String" | "Integer" | "Double" | "Boolean" | "Range" | "Error" | "Array";

Property Value

Excel.NamedItemType | "String" | "Integer" | "Double" | "Boolean" | "Range" | "Error" | "Array"

Remarks

[ API set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array ]

value

Represents the value computed by the name's formula. For a named range, it will return the range address. This API returns the #VALUE! error in the Excel UI if it refers to a user-defined function.

value?: any;

Property Value

any

Remarks

[ API set: ExcelApi 1.1 ]

valueAsJson

A JSON representation of the values in this named item. Unlike NamedItem.value, NamedItem.valueAsJson supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use NamedItem.valueAsJsonLocal.

valueAsJson?: CellValue | string;

Property Value

Excel.CellValue | string

Remarks

[ API set: ExcelApi 1.16 ]

valueAsJsonLocal

A JSON representation of the values in this named item. Unlike NamedItem.value, NamedItem.valueAsJsonLocal supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use NamedItem.valueAsJson.

valueAsJsonLocal?: CellValue | string;

Property Value

Excel.CellValue | string

Remarks

[ API set: ExcelApi 1.16 ]

visible

Specifies if the object is visible.

visible?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.1 ]