Skip to content
本页内容

Index (属性)

返回 int 值,它代表对象在其同类对象所组成的集合内的索引号。

示例

python
#本示例显示图表工作表 Chart1 的索引号
def test():
    chart = Application.Charts.Item("Chart1")
    print(chart.Index)
python
#本示例显示图表工作表 Chart2 的索引号是否为2
def test():
    chart = Application.Charts.Item("Chart2")
    print(chart.Index == 2)