1

以下の数値ファイルを使用して、セル 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今、上記のコードでを取り除こうとしています。私はそれを理解することはできません。どんな助けでも大歓迎です。

4

1 に答える 1

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
于 2015-05-10T03:38:57.350 に答える