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

Added in version 0.9.0.

add(name, refers_to)

セル範囲に新しい名前を定義します。

Parameters

namestr

名前として使う文字列を指定します。名前にスペースを含めることはできません。またセルを参照することもできません。

refers_tostr

A1形式で名前の参照先を指定します。

Returns

Name

Added in version 0.9.0.

property api

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

Added in version 0.9.0.

property count

コレクションに含まれるオブジェクトの数を返します。