主题
Count (属性)
返回一个 int 值,它代表集合中对象的数量。
示例
python
#本示例将第一张工作表中所有形状的宽度扩大至原来的1.2倍
def test():
shapes = Application.Worksheets.Item(1).Shapes
for i in range(1, shapes.Count):
shapes.Item(i).Width *= 1.2
python
#本示例显示活动工作表中形状的数量
def test():
shapes = ActiveSheet.Shapes
print(shapes.Count)