New to Telerik Document ProcessingStart a free 30-day trial

Manages a collection of defined names within a workbook or worksheet scope, providing add, remove, and lookup operations.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class NameCollection : IEnumerable<ISpreadsheetName>, IEnumerable

Inheritance: objectNameCollection

Implements: IEnumerableIEnumerable<ISpreadsheetName>

Methods

Adds a new defined name with the specified formula reference at the given cell index.

C#
public ISpreadsheetName Add(string name, string refersTo, CellIndex cellIndex, string comment = null, bool isVisible = true)
Parameters:namestring

The name.

refersTostring

The refers to.

cellIndexCellIndex

Index of the cell.

commentstring

The comment.

isVisiblebool

The is visible.

Returns:

ISpreadsheetName

Adds a new defined name with the specified formula reference at the given cell location.

C#
public ISpreadsheetName Add(string name, string refersTo, int rowIndex, int columnIndex, string comment = null, bool isVisible = true)
Parameters:namestring

The name.

refersTostring

The refers to.

rowIndexint

Index of the row.

columnIndexint

Index of the column.

commentstring

The comment.

isVisiblebool

The is visible.

Returns:

ISpreadsheetName

Checks whether a defined name with the specified identifier exists in the collection.

C#
public bool Contains(string name)
Parameters:namestring

The name.

Returns:

bool

The value indicating whether the collection contains the specified name.

Returns a strongly typed enumerator that iterates through the defined names in the collection.

C#
public IEnumerator<ISpreadsheetName> GetEnumerator()
Returns:

IEnumerator<ISpreadsheetName>

A IEnumerator<T> that can be used to iterate through the collection.

Implements: IEnumerable<ISpreadsheetName>.GetEnumerator()

Removes the defined name matching the specified identifier from the collection.

C#
public void Remove(string name)
Parameters:namestring

The name.

Attempts to retrieve the defined name matching the specified identifier.

C#
public bool TryGetSpreadsheetName(string name, out ISpreadsheetName spreadsheetName)
Parameters:namestring

The name.

spreadsheetNameISpreadsheetName

The resulting name.

Returns:

bool

The value indicating whether the name was successfully found.

Properties

Gets the ISpreadsheetName matching the specified name, using case-insensitive lookup.

C#
public ISpreadsheetName this[string name] { get; }
Parameters:namestringProperty Value:

The defined name.