接口 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.-
方法概要
修饰符和类型方法说明Defines a new name.void
clear()
Clears theIName
collection.boolean
Determines whether name is contained inINames
void
Generates a collection of defined name from the json string.get
(int index) Returns theIName
object from a collection.Returns theIName
object from a collection.int
getCount()
Returns the number of objects in the collection.toJson()
Generates the json string from the defined names.
-
方法详细资料
-
getCount
int getCount()Returns the number of objects in the collection. -
add
Defines a new name. Returns theIName
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
Determines whether name is contained inINames
- 参数:
name
- The name.- 返回:
- Whether iNames contains the name.
-
get
Returns theIName
object from a collection.- 参数:
name
- Specifies the name of an element in the collection.
-
get
Returns theIName
object from a collection.- 参数:
index
- Specifies the index of an element in the collection.
-
clear
void clear()Clears theIName
collection. -
fromJson
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
-