我正在尝试访问 Applescript 中单元格的完整参考。到目前为止,我已经设法使用如下脚本获取单元格引用和表引用:
tell application "Numbers"
tell document 1
repeat with i from 1 to count of sheets
tell sheet i
repeat with j from 1 to count of tables
tell table j
try
set currentCell to the first cell of the selection range
return name of currentCell
end try
end tell
end repeat
end tell
end repeat
end tell
end tell
我似乎无法获得相同的结构来获取工作表或文档参考。我尝试访问单元格的属性,我得到类似:
{column:column "A" of table "Table 1" of sheet "Sheet 1" of document "Untitled" of
application "Numbers", alignment:center, value:0.0, background color:{59111, 59111,
59111}, text color:{0, 0, 0}, font size:10.0, vertical alignment:top, name:"A1",
class:cell, font name:"HelveticaNeue", format:automatic, row:row "1" of table "Table
1" of sheet "Sheet 1" of document "Untitled" of application "Numbers", text
wrap:true}
因此,单元格的 column 属性似乎包含完整的引用,但如果我直接通过 column 属性访问引用。谁能给我一些关于如何使用applescript获取工作表和文档的指导。
干杯
伊恩