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>

Added in version 0.9.0.

property api: Any

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

Added in version 0.9.0.

delete()

Deletes the name.

Added in version 0.9.0.

property name: str

Returns or sets the name of the name object.

Added in version 0.9.0.

property refers_to: str | None

Returns or sets the formula that the name is defined to refer to, in A1-style notation, beginning with an equal sign.

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

Setter type:

str

Added in version 0.9.0.

property refers_to_range: Range

Returns the Range object referred to by a Name object.

Added in version 0.9.0.