【问题标题】:Using AppleScript, how to set the value of a cell of the Numbers App/iWork file使用 AppleScript,如何设置 Numbers App/iWork 文件的单元格的值
【发布时间】:2015-05-09 22:46:53
【问题描述】:

使用下面的数字文件,如何在单元格 B2 中设置值?

困难的部分是我不能使用下面的任何代码:

set the value of cell 2 of column "B" to "200.00"

set the value of cell "B2" to "200.00"

根据需求,我必须找到行和列,因为它们的位置可以改变。

我已经完成了这部分工作:

set the value of cell 2 of column of (first cell of row 1 whose value is "SUM") to "200.00"

现在我正试图摆脱上面代码中的cell 2。我想不通。任何帮助将不胜感激。

【问题讨论】:

    标签: applescript automator iwork


    【解决方案1】:

    您可以像这样使用标题的名称:

    tell application "Numbers"
        tell table 1 of sheet 1 of document 1
            set colIndex to address of column "SUM"
            set value of cell colIndex of row "Jan" to "200.00"
        end tell
    end tell
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多