Class NamedRange

java.lang.Object
com.independentsoft.office.odf.NamedElement
com.independentsoft.office.odf.NamedRange

public class NamedRange extends NamedElement
Represents a cell range that has a name assigned.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes a new instance of the NamedRange class.
    NamedRange​(String name)
    Initializes a new instance of the NamedRange class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new object that is a deep copy of the current instance.
    Gets an address of the base cell for relative addresses in formulas that occur within a condition.
    Gets an address of the named range.
    Gets the name of a database range on which to perform operations.
    Specifies whether the name of the range can be used within the specification of a print range, a filter, a repeating row, or a repeat column.
    void
    setBaseCellAddress​(String baseCellAddress)
    Sets an address of the base cell for relative addresses in formulas that occur within a condition.
    void
    setCellRangeAddress​(String cellRangeAddress)
    Sets an address of the named range.
    void
    setName​(String name)
    Sets the name of a database range on which to perform operations.
    void
    setRangeUsableAs​(String rangeUsableAs)
    Specifies whether the name of the range can be used within the specification of a print range, a filter, a repeating row, or a repeat column.
    Converts the value of the current NamedRange object to its equivalent string representation.

    Methods inherited from class java.lang.Object

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

    • NamedRange

      public NamedRange()
      Initializes a new instance of the NamedRange class.
    • NamedRange

      public NamedRange(String name)
      Initializes a new instance of the NamedRange class.
      Parameters:
      name - the name
  • Method Details

    • clone

      public NamedRange clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in class NamedElement
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current NamedRange object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getName

      public String getName()
      Gets the name of a database range on which to perform operations. Within a single document, only one database range may have no name.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the name of a database range on which to perform operations. Within a single document, only one database range may have no name.
      Parameters:
      name - the new name
    • getCellRangeAddress

      public String getCellRangeAddress()
      Gets an address of the named range. The address can be either absolute or relative.
      Returns:
      the cell range address
    • setCellRangeAddress

      public void setCellRangeAddress(String cellRangeAddress)
      Sets an address of the named range. The address can be either absolute or relative.
      Parameters:
      cellRangeAddress - the new cell range address
    • getBaseCellAddress

      public String getBaseCellAddress()
      Gets an address of the base cell for relative addresses in formulas that occur within a condition. This attribute is only necessary when the condition contains a formula.
      Returns:
      the base cell address
    • setBaseCellAddress

      public void setBaseCellAddress(String baseCellAddress)
      Sets an address of the base cell for relative addresses in formulas that occur within a condition. This attribute is only necessary when the condition contains a formula.
      Parameters:
      baseCellAddress - the new base cell address
    • getRangeUsableAs

      public String getRangeUsableAs()
      Specifies whether the name of the range can be used within the specification of a print range, a filter, a repeating row, or a repeat column.
      Returns:
      the range usable as
    • setRangeUsableAs

      public void setRangeUsableAs(String rangeUsableAs)
      Specifies whether the name of the range can be used within the specification of a print range, a filter, a repeating row, or a repeat column.
      Parameters:
      rangeUsableAs - the new range usable as