我正在尝试用AppleScript教我自己需要AppleScript的东西。
(我知道必须有重复的东西的快捷方式,但是我找不到关于如何做到这一点的好教程,所以我做了很长的路。)
我一直坚持如何选择多个列(或行)。我想选择填充的列并对它们进行排序,但我不能,因为我不知道如何选择多列。任何指导都将非常感谢。
我希望脚本能做的是:
这是我到目前为止所做的:
tell application "Microsoft Excel"
activate
open (choose file)
end tell
tell application "Microsoft Excel"
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete row 1
delete column 4
delete column 4
delete column 4
delete column 4
delete column 7
select row 1
select row 2
end tell
答案 0 :(得分:2)
这应该让你开始:Excel 2004 AppleScript Reference
tell application "Microsoft Excel"
tell active sheet of active workbook
set myRows to range "1:27"
delete myRows
set myColumn to range "D:G"
delete myColumn
end tell
end tell