接口 INames


public interface INames
Represents a collection of all the IName objects in the workbook.Each Name object represents a defined name for a range of cells. Names can be either built-in names — such as Database, Print_Area, and Auto_Open — or custom names.
  • 方法概要

    修饰符和类型
    方法
    说明
    add(String name, String refersTo)
    Defines a new name.
    void
    Clears the IName collection.
    boolean
    Determines whether name is contained in INames
    void
    Generates a collection of defined name from the json string.
    get(int index)
    Returns the IName object from a collection.
    get(String name)
    Returns the IName object from a collection.
    int
    Returns the number of objects in the collection.
    Generates the json string from the defined names.
  • 方法详细资料

    • getCount

      int getCount()
      Returns the number of objects in the collection.
    • add

      IName add(String name, String refersTo)
      Defines a new name. Returns the IName object.
      参数:
      name - The text to use as the name. Names cannot include spaces andcannot look like cell references.
      refersTo - Required unless one of the other RefersTo arguments is specified.Describes what the name refers to (using A1-style notation).
      返回:
      Returns a new IName object.
    • contains

      boolean contains(String name)
      Determines whether name is contained in INames
      参数:
      name - The name.
      返回:
      Whether iNames contains the name.
    • get

      IName get(String name)
      Returns the IName object from a collection.
      参数:
      name - Specifies the name of an element in the collection.
    • get

      IName get(int index)
      Returns the IName object from a collection.
      参数:
      index - Specifies the index of an element in the collection.
    • clear

      void clear()
      Clears the IName collection.
    • fromJson

      void fromJson(String json)
      Generates a collection of defined name from the json string.
      参数:
      json - the json string that contains defined names
    • toJson

      String toJson()
      Generates the json string from the defined names.
      返回:
      the json string