NativeExcel for .Net Developer's Reference

IWorkbook.Names Property

Returns an INames collection that represents all the defined names in the specified workbook.

[Visual Basic]
PropertyReadOnlyNamesAsINames
[C#]
INamesNames{get;}
[C++]
__propertyINames*get_Names();
[JScript]
functiongetNames():INames

Property Value

INames collection.

Example

This example creates a new defined name for the workbook.

[C#]
Workbook.Names.Add("MyName","=Sheet1!$A$2");
[VisualBasic]
Workbook.Names.Add("MyName","=Sheet1!$A$2")
[C++]
Workbook->Names->Add(S"MyName",S"=Sheet1!$A$2");

See Also

IWorkbook Interface | NativeExcel Namespace | INames Interface | IWorksheet.Names