Table of Contents

Class DefinedNameCollection

Namespace
SheetStream
Assembly
SheetStream.dll

Defined names of a workbook. Add them any time before the package is saved.

public sealed class DefinedNameCollection : IReadOnlyList<DefinedName>, IReadOnlyCollection<DefinedName>, IEnumerable<DefinedName>, IEnumerable
Inheritance
DefinedNameCollection
Implements
Inherited Members

Properties

Count

Gets the number of elements in the collection.

public int Count { get; }

Property Value

int

The number of elements in the collection.

this[int]

Gets the element at the specified index in the read-only list.

public DefinedName this[int index] { get; }

Parameters

index int

The zero-based index of the element to get.

Property Value

DefinedName

The element at the specified index in the read-only list.

Methods

Add(string, string, Worksheet?, bool)

Adds a name. refersTo is a range ("'Settings'!B2", "Data!A1:A10") or any formula ("=0.07"). Plain ranges are made absolute and sheet-qualified with scope's name when they lack a sheet.

public DefinedName Add(string name, string refersTo, Worksheet? scope = null, bool hidden = false)

Parameters

name string
refersTo string
scope Worksheet
hidden bool

Returns

DefinedName

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<DefinedName> GetEnumerator()

Returns

IEnumerator<DefinedName>

An enumerator that can be used to iterate through the collection.