Namespace EasyXLS

Class ExcelName

System.Object
EasyXLS.ExcelName

public class ExcelName extends System.Object
This class stores names with its information like title and formula.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Defines an instance of a name.
    ExcelName​(System.String sNameText, System.String sRefersTo)
    Defines an instance of a name with the specified title and formula.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates and returns a copy of this object.
    System.String
    Returns the title of the name.
    System.String
    Returns the formula of the range.
    int
    Returns the sheet index of the name.
    bool
    Returns true if the name is a build-in name like print area, print titles.
    bool
    Returns the hidden setting of the name.
    void
    setBuildInName​(bool isBuildIn)
    Internal use only
    void
    setHidden​(bool isHidden)
    Sets the hidden option of the name.
    void
    setNameText​(System.String text)
    Sets the title of the name.
    void
    setRefersTo​(System.String formula)
    Sets the formula of the range.
    void
    setSheetIndex​(int sheetIndex)
    Internal use only

    Methods inherited from class System.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExcelName

      public ExcelName()
      Defines an instance of a name.
    • ExcelName

      public ExcelName(System.String sNameText, System.String sRefersTo)
      Defines an instance of a name with the specified title and formula.
      Parameters:
      sNameText - the title of the name
      sRefersTo - the formula of the name; it should start with = (an equal sign) and can be any kind of formula recognized by Excel
  • Method Details

    • getNameText

      public System.String getNameText()
      Returns the title of the name.
      Returns:
      the title of the name
      See Also:
      setNameText(System.String)
    • setNameText

      public void setNameText(System.String text)
      Sets the title of the name.
      Parameters:
      text - the title of the name
      See Also:
      getNameText()
    • getRefersTo

      public System.String getRefersTo()
      Returns the formula of the range. It can be a cell reference or a cell range.
      Returns:
      the formula of the range
      See Also:
      setRefersTo(System.String)
    • setRefersTo

      public void setRefersTo(System.String formula)
      Sets the formula of the range.
      Parameters:
      formula - the formula of the range. It can be a cell reference or a cell range
      See Also:
      getRefersTo()
    • IsHidden

      public bool IsHidden()
      Returns the hidden setting of the name.
      Returns:
      the hidden setting of the name
      See Also:
      setHidden(bool)
    • setHidden

      public void setHidden(bool isHidden)
      Sets the hidden option of the name.
      Parameters:
      isHidden - the hidden option of the name
      See Also:
      IsHidden()
    • getSheetIndex

      public int getSheetIndex()
      Returns the sheet index of the name. It can be 0 if it is a global name or sheet index (+1) if a local name.
      Returns:
      the sheet index of the name
    • setSheetIndex

      public void setSheetIndex(int sheetIndex)
      Internal use only
      Parameters:
      sheetIndex - the sheet index of the name
    • IsBuildInName

      public bool IsBuildInName()
      Returns true if the name is a build-in name like print area, print titles.
      Returns:
      true if the name is a build-in name
    • setBuildInName

      public void setBuildInName(bool isBuildIn)
      Internal use only
      Parameters:
      isBuildIn - true if the name is a build-in name
    • Clone

      public ExcelName Clone()
      Creates and returns a copy of this object.
      Returns:
      a clone of this instance.