AppleScript 和 Numbers 中的公式和值
Formulas and values in AppleScript and Numbers
我正在尝试在 Numbers 中的另一个地方使用 Numbers 中单元格的值。
使用公式有效,但是当我使用 AppleScript 在另一个 sheet 上的另一个公式中使用该值时,我发现它传递的是公式,而不是值。
set value of (cell "D2") to "=AVERAGE(E3:E1460)"
set value of n to (cell "D2")
对于 n
,我得到的是 "=AVERAGE(E3:E1460)"
而不是 14.56
。
如何获取值 14.56
?
如果需要 值(数字、日期、文本、布尔值或缺失值):单元格中的实际值,如果单元格为空,则为缺失值。
变化:
set value of n to (cell "D2")
收件人:
set n to value of (cell "D2")
如果您想要 cell
的 公式 ,请使用,例如:
set f to formula of (cell "D2")
我正在尝试在 Numbers 中的另一个地方使用 Numbers 中单元格的值。
使用公式有效,但是当我使用 AppleScript 在另一个 sheet 上的另一个公式中使用该值时,我发现它传递的是公式,而不是值。
set value of (cell "D2") to "=AVERAGE(E3:E1460)"
set value of n to (cell "D2")
对于 n
,我得到的是 "=AVERAGE(E3:E1460)"
而不是 14.56
。
如何获取值 14.56
?
如果需要 值(数字、日期、文本、布尔值或缺失值):单元格中的实际值,如果单元格为空,则为缺失值。
变化:
set value of n to (cell "D2")
收件人:
set n to value of (cell "D2")
如果您想要 cell
的 公式 ,请使用,例如:
set f to formula of (cell "D2")