Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Apple Script and Number

Hi all, my apologies if this is a silly questions but it's been a long time since I've done any type of script writing and I am a complete Apple Script amateur.


I am attempting to write a simple program that opens a Numbers document, and populates cells from one sheet, from the cells of another sheet, creates a PDF of the result, and then e-mails that PDF.


So far, I've gotten this, and I keep getting an error....


on run {input, parameters}


tell application "Numbers"

activate

open "/Users/jimmy/newfolder/Experiment.numbers"

tell the second table of the sheet {name:"Invoice"}

set the value of cell "A2" to the value of cell "K2" of the first table of the sheet {name:"Roster"}

end tell

end tell

return input

end run


The error is....


Numbers got an error: Can’t set sheet {name:"Invoice"} to value of cell "K2" of table 1 of sheet {name:"Roster"} of table 2 of sheet {name:"Invoice"}.



Once Again, apologies if this is a silly question, but I've been at it for a bit and can't quite figure out how I should be scripting this.

Posted on Jun 30, 2015 9:43 AM

Reply
16 replies

Apple Script and Number

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.