com.aspose.gridweb
Class GridNameCollection

java.lang.Object
    extended by com.aspose.gridweb.GridNameCollection

public class GridNameCollection 
extends java.lang.Object

Encapsulates a collection of com.aspose.gridweb.Name objects.


Property Getters/Setters Summary
intgetCount()
          
GridNameget(int)
           Gets the com.aspose.gridweb.Name element at the specified index.
 
Method Summary
intadd(int sheetIndex, java.lang.String text, java.lang.String refersTo)
           Defines a new name in the specified sheet.
intadd(java.lang.String text, java.lang.String refersTo)
           Defines a new global name.
voidclear()
           Removes all Names;
java.util.Iteratoriterator()
           Gets the rows enumerator
voidremove(java.lang.String[] names)
           Remove an array of name
voidremoveAt(int index)
           Remove the name at the specific index.
 

Property Getters/Setters Detail

getCount

public int getCount()

get

public GridName get(int index)
Gets the com.aspose.gridweb.Name element at the specified index.
Parameters:
index - The zero based index of the element.
Returns:
The element at the specified index.

Method Detail

iterator

public java.util.Iterator iterator()
Gets the rows enumerator
Returns:
The rows enumerator

add

public int add(java.lang.String text, java.lang.String refersTo)
Defines a new global name.
Parameters:
text - Name text.It can have sheetname .
refersTo - The formula that the name is defined to refer to.It must have a sheetname .eg.'sheet hello!'A1:B2.
Returns:
Name object index.

add

public int add(int sheetIndex, java.lang.String text, java.lang.String refersTo)
Defines a new name in the specified sheet.
Parameters:
sheetIndex - The sheet index that the name is applyed in.
text - Name text.It can not have sheetname .
refersTo - The formula that the name is defined to refer to.It must have sheetname .eg.'sheet hello!'A1:B2.
sheetIndex - Name's SheetIndex ,the index is from 1.
Returns:
Name object index.

remove

public void remove(java.lang.String[] names)
Remove an array of name
Parameters:
names - The names' text.

removeAt

public void removeAt(int index)
Remove the name at the specific index. Please make sure that the name is not referred by the other formulas before calling the method. And if the name is referred,please only set Name.RefersTo as null.
Parameters:
index -

clear

public void clear()
Removes all Names;

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.