我正在尝试自学 AppleScript 一些我真正需要 AppleScript 的东西。
(我知道重复的东西必须有捷径,但我找不到关于如何做到这一点的好教程,所以我做了很长的路要走。)
我被困在如何一次选择多个列(或行)上。我想选择填充的列并对它们进行排序,但我不能,因为我不知道如何选择多个列。任何指导将不胜感激。
我希望脚本做的是:
- 打开一个 Excel 文件
- 删除第 1-32 行
- 删除第 4-7 列
- 删除新列 7
- 选择第 1-5 列
- 对第 1-5 列进行排序,首先按任务,其次按样本
- 删除包含ENDO的行
- 保存存档
这是我到目前为止所拥有的:
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