主题
Item (方法)
从集合中返回一个对象。
参数
属性 | 数据类型 | 必填 | 说明 |
---|---|---|---|
Index | Any | 必填 | 对象的名称或索引号。 |
示例
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)