如何使用AppleScript在excel中将单元格值增加1?

这应该是简单的,但我可能没有正确的方式接近它。 我只是想将单元格“C7”的值从4增加到5.这就是我想象的工作方式。 任何build议不胜感激。

tell application "Microsoft Excel" get value of cell "C7" set value of cell "C7" to current value +1 end tell 

在VBA和Applescript中,Excel需要知道工作簿和工作表。 假设您的工作簿和工作表(您想要更改单元格)是激活的单元格,则:

 tell application "Microsoft Excel" tell active workbook to tell active sheet to set value of cell "C7" to (value of cell "C7") + 1 end tell