Represents a collection of all the IName objects in the spreadsheet.
More...
Inherits CollectionBase.
|
virtual Aspose::Cells::Systems::Int32 | Add (intrusive_ptr< Aspose::Cells::Systems::String > text)=0 |
| Defines a new name. More...
|
|
virtual intrusive_ptr< Aspose::Cells::IName > | GetObjectByIndex (Aspose::Cells::Systems::Int32 index)=0 |
| Gets the IName element at the specified index. More...
|
|
virtual intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::IName * > > | FilterIName (Aspose::Cells::NameScopeType type, Aspose::Cells::Systems::Int32 sheetIndex)=0 |
| Gets all defined name by scope. More...
|
|
virtual intrusive_ptr< Aspose::Cells::IName > | GetObjectByIndex (intrusive_ptr< Aspose::Cells::Systems::String > text)=0 |
| Gets the IName element with the specified name. More...
|
|
virtual void | Remove (intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::String *>> names)=0 |
| Remove an array of name More...
|
|
virtual void | Remove (intrusive_ptr< Aspose::Cells::Systems::String > text)=0 |
| Remove the name. More...
|
|
virtual void | RemoveAt (Aspose::Cells::Systems::Int32 index)=0 |
| Remove the name at the specific index. More...
|
|
virtual void | Clear ()=0 |
| Remove all defined names which are not referenced by the formulas and data source. If the defined name is referred, we only set Name.ReferTo as null and hide them. More...
|
|
virtual void | RemoveDuplicateNames ()=0 |
| Remove the duplicate defined names More...
|
|
virtual void | Sort ()=0 |
| Sorts defined names. More...
|
|
Represents a collection of all the IName objects in the spreadsheet.
◆ Add()
virtual Aspose::Cells::Systems::Int32 Aspose::Cells::INameCollection::Add |
( |
intrusive_ptr< Aspose::Cells::Systems::String > |
text | ) |
|
|
pure virtual |
Defines a new name.
- Parameters
-
text | The text to use as the name. |
- Returns
- IName object index.
Name cannot include spaces and cannot look like cell references.
◆ Clear()
virtual void Aspose::Cells::INameCollection::Clear |
( |
| ) |
|
|
pure virtual |
Remove all defined names which are not referenced by the formulas and data source. If the defined name is referred, we only set Name.ReferTo as null and hide them.
◆ FilterIName()
virtual intrusive_ptr<Aspose::Cells::Systems::Array1D<Aspose::Cells::IName*> > Aspose::Cells::INameCollection::FilterIName |
( |
Aspose::Cells::NameScopeType |
type, |
|
|
Aspose::Cells::Systems::Int32 |
sheetIndex |
|
) |
| |
|
pure virtual |
Gets all defined name by scope.
- Parameters
-
type | The scope type. |
sheetIndex | The sheet index. Only effects when scope type is NameScopeType.Worksheet |
- Returns
◆ GetObjectByIndex() [1/2]
virtual intrusive_ptr<Aspose::Cells::IName> Aspose::Cells::INameCollection::GetObjectByIndex |
( |
Aspose::Cells::Systems::Int32 |
index | ) |
|
|
pure virtual |
Gets the IName element at the specified index.
- Parameters
-
index | The zero based index of the element. |
- Returns
- The element at the specified index.
◆ GetObjectByIndex() [2/2]
virtual intrusive_ptr<Aspose::Cells::IName> Aspose::Cells::INameCollection::GetObjectByIndex |
( |
intrusive_ptr< Aspose::Cells::Systems::String > |
text | ) |
|
|
pure virtual |
Gets the IName element with the specified name.
- Parameters
-
- Returns
- The element with the specified name.
◆ Remove() [1/2]
virtual void Aspose::Cells::INameCollection::Remove |
( |
intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::String *>> |
names | ) |
|
|
pure virtual |
Remove an array of name
- Parameters
-
◆ Remove() [2/2]
virtual void Aspose::Cells::INameCollection::Remove |
( |
intrusive_ptr< Aspose::Cells::Systems::String > |
text | ) |
|
|
pure virtual |
Remove the name.
- Parameters
-
◆ RemoveAt()
virtual void Aspose::Cells::INameCollection::RemoveAt |
( |
Aspose::Cells::Systems::Int32 |
index | ) |
|
|
pure virtual |
Remove the name at the specific index.
- Parameters
-
index | index of the Name to be removed. |
Please make sure that the name is not referred by the other formulas before calling the method. And if the name is referred, setting Name.RefersTo as null is better.
◆ RemoveDuplicateNames()
virtual void Aspose::Cells::INameCollection::RemoveDuplicateNames |
( |
| ) |
|
|
pure virtual |
Remove the duplicate defined names
◆ Sort()
virtual void Aspose::Cells::INameCollection::Sort |
( |
| ) |
|
|
pure virtual |
Sorts defined names.
If you create a large amount of named ranges in the Excel file, please call this method after all named ranges are created and before saving