Skip to content
本页内容

Shapes (属性)

返回一个 Shapes集合,它代表工作表上的所有形状。只读。

示例

python
#此示例向第一张工作表中添加兰色的虚线
def test():
    Wshapes = Application.Worksheets.Item(1).Shapes.AddLine(10, 10, 250, 250).Line
    Wshapes.DashStyle = msoLineDashDotDot
    Wshapes.ForeColor.RGB = RGB(50, 0, 128)
python
#本示例选中活动工作表上的所有形状
def test():
    Application.ActiveSheet.Shapes.SelectAll()