I want to sort a Numbers table using Javascript for Automation, the code like
table.sort(table.columns["P"], {direction: "descending"})
But the Script Editor told me: Parameter is missing. (-1701)
Here is the code I wrote:
var Numbers = Application("Numbers")
var path = Path("/Volumes/sfufoet/test.numbers")
var doc = Numbers.open(path)
var sheet = doc.sheets[1]
var table = sheet.tables[1]
table.sort(table.columns["P"], {direction: "descending"})
Thanks!