org.apache.poi.hssf.usermodel
Class HSSFName

java.lang.Object
  extended by org.apache.poi.hssf.usermodel.HSSFName
All Implemented Interfaces:
org.apache.poi.ss.usermodel.Name

public final class HSSFName
extends java.lang.Object
implements org.apache.poi.ss.usermodel.Name

High Level Representation of a 'defined name' which could be a 'built-in' name, 'named range' or name of a user defined function.

Author:
Libin Roman (Vista Portal LDT. Developer)

Method Summary
 java.lang.String getNameName()
           
 java.lang.String getReference()
          Deprecated. (Nov 2008) Misleading name. Use getRefersToFormula() instead.
 java.lang.String getRefersToFormula()
          Returns the formula that the name is defined to refer to.
 java.lang.String getSheetName()
          Get the sheets name which this named range is referenced to
 boolean isDeleted()
          Tests if this name points to a cell that no longer exists
 boolean isFunctionName()
          Checks if this name is a function name
 void setNameName(java.lang.String nameName)
          Sets the name of the named range
 void setReference(java.lang.String ref)
          Deprecated. (Nov 2008) Misleading name. Use setRefersToFormula(String) instead.
 void setRefersToFormula(java.lang.String formulaText)
          Sets the formula that the name is defined to refer to.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSheetName

public java.lang.String getSheetName()
Get the sheets name which this named range is referenced to

Specified by:
getSheetName in interface org.apache.poi.ss.usermodel.Name
Returns:
sheet name, which this named range referred to

getNameName

public java.lang.String getNameName()
Specified by:
getNameName in interface org.apache.poi.ss.usermodel.Name
Returns:
text name of this defined name

setNameName

public void setNameName(java.lang.String nameName)
Sets the name of the named range

The following is a list of syntax rules that you need to be aware of when you create and edit names.

Specified by:
setNameName in interface org.apache.poi.ss.usermodel.Name
Parameters:
nameName - named range name to set
Throws:
java.lang.IllegalArgumentException - if the name is invalid or the workbook already contains this name (case-insensitive)

getReference

public java.lang.String getReference()
Deprecated. (Nov 2008) Misleading name. Use getRefersToFormula() instead.

Returns the formula that the name is defined to refer to.


setReference

public void setReference(java.lang.String ref)
Deprecated. (Nov 2008) Misleading name. Use setRefersToFormula(String) instead.

Sets the formula that the name is defined to refer to.


setRefersToFormula

public void setRefersToFormula(java.lang.String formulaText)
Sets the formula that the name is defined to refer to. The following are representative examples:

Specified by:
setRefersToFormula in interface org.apache.poi.ss.usermodel.Name
Parameters:
formulaText - the reference for this name
Throws:
java.lang.IllegalArgumentException - if the specified reference is unparsable

getRefersToFormula

public java.lang.String getRefersToFormula()
Returns the formula that the name is defined to refer to. The following are representative examples:

Specified by:
getRefersToFormula in interface org.apache.poi.ss.usermodel.Name
Returns:
the reference for this name
See Also:
setRefersToFormula(String)

isDeleted

public boolean isDeleted()
Tests if this name points to a cell that no longer exists

Specified by:
isDeleted in interface org.apache.poi.ss.usermodel.Name
Returns:
true if the name refers to a deleted cell, false otherwise

isFunctionName

public boolean isFunctionName()
Checks if this name is a function name

Specified by:
isFunctionName in interface org.apache.poi.ss.usermodel.Name
Returns:
true if this name is a function name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.