主题
Placement (属性)
返回或设置一个包含 XlPlacement 常量的 Any 值,它代表对象附加到它所在的单元格的方式。
示例
python
#本示例设置工作表 Sheet1 上所有图表大小固定,位置随单元格移动而变化
def test():
chartobjects = Application.Worksheets.Item("Sheet1").ChartObjects()
chartobjects.Placement = xlMove
python
#本示例显示第一张工作表上所有图表是否大小和位置随单元格而变化
def test():
chartobjects = Application.Worksheets.Item(1).ChartObjects()
print(chartobjects.Placement == xlMoveAndSize)