在 excel 2011 中,使用苹果脚本创建了一个额外的系列。
tell application "Microsoft Excel"
make new workbook
tell worksheet "sheet1" of active workbook
set value of cell "A1" to 10
set value of cell "B1" to 5
set obj to make new chart object at end with properties {left position:100, top:100, height:200, width:300, name:"MyChart"}
set ochart1 to chart of chart object "MyChart"
tell ochart1
set chart type to bar clustered
make new series at end with properties {series values:"=Sheet1!$A$1:$B$1", name:"2"}
end tell
end tell
end tell
我的问题是,在 sheet1 中创建了一个额外的系列(即系列 1)。