Show / Hide Table of Contents

Class DefinedNameCollection

Stores defined names for ranges in a workbook.

Inheritance
System.Object
DefinedNameCollection
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class DefinedNameCollection : IEnumerable<DefinedName>

Constructors

DefinedNameCollection(Workbook)

Declaration
public DefinedNameCollection(Workbook workbook)
Parameters
Type Name Description
Workbook workbook

Properties

Item[Int32]

Declaration
public DefinedName this[int index] { get; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
DefinedName

Workbook

Declaration
public Workbook Workbook { get; }
Property Value
Type Description
Workbook

Methods

DefineName(String, Range)

Define a name for a range

Declaration
public DefinedName DefineName(string name, Range range)
Parameters
Type Name Description
System.String name

The name of the defined name

Range range

The range of the defined name

Returns
Type Description
DefinedName

The newly created defined name

DefineName(String, String)

Define a new name for the workbook

Declaration
public DefinedName DefineName(string name, string formula)
Parameters
Type Name Description
System.String name

The name of the defined name

System.String formula

The formula of the defined name

Returns
Type Description
DefinedName

The new defined name

GetEnumerator()

Declaration
public IEnumerator<DefinedName> GetEnumerator()
Returns
Type Description
IEnumerator<DefinedName>

RemoveDefinendName(String)

Remove a defined name

Declaration
public void RemoveDefinendName(string name)
Parameters
Type Name Description
System.String name

The name of the defined name to remove

TryGetDefinedName(Sheet, String)

Declaration
public DefinedName TryGetDefinedName(Sheet sheet, string name)
Parameters
Type Name Description
Sheet sheet
System.String name
Returns
Type Description
DefinedName

TryGetWorkbookDefinedName(String)

Declaration
public DefinedName TryGetWorkbookDefinedName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
DefinedName
Back to top Generated by DocFX