GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    DefinedNameCollection Class

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Collection of defined names that are not directly related with one cell range.

    • C#
    • VB.NET
    public sealed class DefinedNameCollection : IEnumerable<DefinedName>, IEnumerable
    Public NotInheritable Class DefinedNameCollection
        Implements IEnumerable(Of DefinedName), IEnumerable
    Inheritance:
    System.Object
    DefinedNameCollection
    Implements
    System.Collections.Generic.IEnumerable<DefinedName>
    System.Collections.IEnumerable

    Properties

    Count

    Returns the number of defined names in collection.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    Item[Int32]

    Gets or sets defined name described by index from collection.

    • C#
    • VB.NET
    public DefinedName this[int index] { get; set; }
    Public Property Item(index As Integer) As DefinedName
    Parameters
    index
    System.Int32

    Index of the defined name.

    Property Value
    DefinedName

    Item[String]

    Gets defined name described by name from collection.

    • C#
    • VB.NET
    public DefinedName this[string definedName] { get; }
    Public ReadOnly Property Item(definedName As String) As DefinedName
    Parameters
    definedName
    System.String

    Name of the defined name.

    Property Value
    DefinedName

    Methods

    AddCopy(DefinedName)

    Adds a copy of another defined name to collection and return index of the new defined name.

    • C#
    • VB.NET
    public int AddCopy(DefinedName source)
    Public Function AddCopy(source As DefinedName) As Integer
    Parameters
    source
    DefinedName

    The source defined name.

    Returns
    System.Int32

    Index of the defined name.

    AddDefinedName(String, String, Int32)

    Adds defined name to collection and returns index of that defined name.

    • C#
    • VB.NET
    public int AddDefinedName(string name, string value, int localSheetIndex)
    Public Function AddDefinedName(name As String, value As String, localSheetIndex As Integer) As Integer
    Parameters
    name
    System.String

    Name of the defined name.

    value
    System.String

    Range string.

    localSheetIndex
    System.Int32

    Local sheet index. If the value is -1, defined name is global.

    Returns
    System.Int32

    Index of the defined name.

    Clear()

    Removes all elements from defined names collection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    GetEnumerator()

    Returns an System.Collections.Generic.IEnumerator<T> for the collection.

    • C#
    • VB.NET
    public IEnumerator<DefinedName> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of DefinedName)
    Returns
    System.Collections.Generic.IEnumerator<DefinedName>

    An System.Collections.Generic.IEnumerator<T> for the collection.

    RemoveDefinedName(String)

    Removes the defined name described by name from collection.

    • C#
    • VB.NET
    public void RemoveDefinedName(string definedName)
    Public Sub RemoveDefinedName(definedName As String)
    Parameters
    definedName
    System.String

    Name of the defined name.

    RemoveDefinedNameAt(Int32)

    Removes the defined name described by index from collection.

    • C#
    • VB.NET
    public void RemoveDefinedNameAt(int index)
    Public Sub RemoveDefinedNameAt(index As Integer)
    Parameters
    index
    System.Int32

    Index of the defined name.

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.