Name

class Name

The name object is a member of the names collection:

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

在 0.9.0 版本加入.

property api: Any

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

在 0.9.0 版本加入.

delete()

删除名称。

在 0.9.0 版本加入.

property name: str

返回或者设置命名对象的名称。

在 0.9.0 版本加入.

property refers_to: str | None

返回或者设置名称引用的公式,公式以等号开头,采用 A1表示法 。

Returns None when an older remote client supplies neither the definition nor single-range coordinates for the name.

Setter type:

str

在 0.9.0 版本加入.

property refers_to_range: Range

返回命名对象引用的区域对象。

在 0.9.0 版本加入.