Skip to content
本页内容

Item (方法)

从集合中返回一个对象。

参数

属性数据类型必填说明
IndexAny必填对象的名称或索引号。

示例

python
#此示例激活工作表 Sheet1
def test():
    Application.Sheets.Item("Sheet1").Activate()
python
#本示例显示活动工作簿中的每个工作表的名称
def test():
    sheets = Application.ActiveWorkbook.Sheets
    for i in range(1, sheets.Count):
        print(sheets.Item(i).Name)