Class WorksheetNamesCollection
Summary description for NamesCollection.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
public class WorksheetNamesCollection : CollectionBaseEx<IName>, IList<IName>, ICollection<IName>, IEnumerable<IName>, IParentApplication, ICloneParent, INames, IEnumerable
Constructors
WorksheetNamesCollection(IApplication, Object)
Creates new empty collection.
Declaration
public WorksheetNamesCollection(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the collection. |
System.Object | parent | Parent object for the new collection. |
Properties
Item[Int32]
Returns a single Name object from a Names collection.
Declaration
public IName this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
IName |
Item[String]
Returns a single Name object from a Names collection.
Declaration
public IName this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Property Value
Type |
---|
IName |
ParentWorksheet
Returns parent worksheet of the collection.
Declaration
public IWorksheet ParentWorksheet { get; }
Property Value
Type |
---|
IWorksheet |
Methods
Add(IName)
Defines a new name.
Declaration
public IName Add(IName name)
Parameters
Type | Name | Description |
---|---|---|
IName | name | Name object to add. |
Returns
Type | Description |
---|---|
IName | Added Name object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If name argument is NULL. |
Add(IName, Boolean)
Defines a new name.
Declaration
public IName Add(IName name, bool bAddInGlobalNamesHash)
Parameters
Type | Name | Description |
---|---|---|
IName | name | Name object to add. |
System.Boolean | bAddInGlobalNamesHash | Indicates is adds in global names hash. |
Returns
Type | Description |
---|---|
IName | Added Name object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If name argument is NULL. |
Add(NameRecord)
Defines a new name.
Declaration
public IName Add(NameRecord name)
Parameters
Type | Name | Description |
---|---|---|
NameRecord | name | NameRecord containing info for new Name object. |
Returns
Type | Description |
---|---|
IName | Name object that was added to the collection. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If specified NameRecord is NULL. |
Add(NameRecord, Boolean)
Defines a new name.
Declaration
public IName Add(NameRecord name, bool bAddInGlobalNamesHash)
Parameters
Type | Name | Description |
---|---|---|
NameRecord | name | NameRecord containing info for new Name object. |
System.Boolean | bAddInGlobalNamesHash | Indicates is adds in global names hash. |
Returns
Type | Description |
---|---|
IName | Name object that was added to the collection. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If specified NameRecord is NULL. |
Add(String)
Adds new named range to the collection.
Declaration
public IName Add(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the new named range. |
Returns
Type | Description |
---|---|
IName | Newly added named range. |
Add(String, IRange)
Defines a new name.
Declaration
public IName Add(string name, IRange namedRange)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name for the new Name object. |
IRange | namedRange | Range that will be associated with the Name. |
Returns
Type | Description |
---|---|
IName | Newly created Name object. |
AddLocal(IName)
Adds a new name only to this collection (without registering it in the workbook names collection).
Declaration
public IName AddLocal(IName name)
Parameters
Type | Name | Description |
---|---|---|
IName | name | Name object to add. |
Returns
Type | Description |
---|---|
IName | Added Name object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If name argument is NULL. |
AddRange(NameRecord[])
Defines range of new names.
Declaration
public void AddRange(NameRecord[] names)
Parameters
Type | Name | Description |
---|---|---|
NameRecord[] | names | Array of NameRecords containing info for new Name objects. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If array of NameRecords is NULL. |
Clear()
Clear collection.
Declaration
public void Clear()
Contains(String)
Checks whether collection contains named range.
Declaration
public bool Contains(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the named range to search. |
Returns
Type | Description |
---|---|
System.Boolean | True if collection contains such named range; otherwise returns False. |
ConvertFullRowColumnNames(ExcelVersion)
Converts full row or column tokens between versions.
Declaration
public void ConvertFullRowColumnNames(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version | Version to convert into. |
GetOrCreateName(String)
Returns existing or creates new name.
Declaration
public NameImpl GetOrCreateName(string strName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strName | Name to create. |
Returns
Type | Description |
---|---|
NameImpl | Required name. |
OnInsertComplete(Int32, IName)
Performs additional processes after inserting a new element into the collection.
Declaration
protected override void OnInsertComplete(int index, IName value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which to insert value. |
IName | value | The new value of the element at the index. |
Overrides
Remove(String)
Removes Name object from the collection.
Declaration
public void Remove(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the object to remove. |
RemoveAt(Int32)
Removes the element at the specified index from the collection.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to remove. |
Rename(IName, String)
Renames name in Name-to-IName hashtable.
Declaration
public void Rename(IName name, string strOldName)
Parameters
Type | Name | Description |
---|---|---|
IName | name | New name implementation. |
System.String | strOldName | Old name. |
SetSheetIndex(Int32)
Sets sheet index.
Declaration
public void SetSheetIndex(int iSheetIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iSheetIndex | Sheet index to set. |
Explicit Interface Implementations
INames.Count
Represent the known named ranges count The name in the formula which has no reference is unknown named ranges
Declaration
int INames.Count { get; }
Returns
Type |
---|
System.Int32 |