主题
Width (属性)
返回或设置一个 float 值,它代表对象的宽度(以磅为单位)。
示例
python
#此示例显示工作表 Sheet1 中第一个内嵌图表图表区的宽度
def test():
chartarea = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.ChartArea
print(chartarea.Width)
python
#此示例设置图表工作表 Chart1 图表区的宽度为 600 磅
def test():
chartarea = Application.Charts.Item("Chart1").ChartObjects(1).Chart.ChartArea
chartarea.Width = 600