Names#

class Names(impl)#

工作簿中所有名称( name )对象的集合:

>>> import xlwings as xw
>>> book = xw.books['Book1']  # book scope and sheet scope
>>> book.names
[<Name 'MyName': =Sheet1!$A$3>]
>>> book.sheets[0].names  # sheet scope only

在 0.9.0 版本加入.

add(name, refers_to)#

为一个单元格组成的区域定义名称。

参数#

namestr

指定作为名称的文字。名称中不能包含空格,也不能是单元格的引用。

refers_tostr

使用英语,按照 A1表示法 描述名称引用的具体内容

返回#

Name

在 0.9.0 版本加入.

property api#

Returns the native object (pywin32 or appscript obj) of the engine beingused.

在 0.9.0 版本加入.

property count#

返回集合中的对象数。