I'm new to AppleScript, and I'm trying to find a way to use it to copy a value from one Numbers spreadsheet and paste it into another file.

The situation is that I've been using Numbers to run a personal budgeting spreadsheet, which has worked fine for many months. However, I've recently moved in with my partner, and so we've created another Numbers spreadsheet for joint costs (electricity bills, shopping trips etc). This joint file is shared between us, and so I can't set it up as an additional tab on my existing budgeting file.

I know that Numbers formulas cannot reference cells in other files, so I'm hoping I can use AppleScript to automate this instead. I'm trying to copy the current monthly balance from the joint file to my personal one. I've already used SUMIFS and a few date formulas to provide a monthly total in the joint file (so the value I want to 'export' will always be in the same cell), and I'll be able to create a specific cell to 'import' into on my personal file.

So my problem is simply getting AppleScript to copy a value is a given cell and paste it into another given cell in different file.

Is this possible?

  • What have you tried? I have an old version of Numbers, however it open Numbers and create 2 separate documents, setting the value of e.g. cell 1 in document 1 to something, then the following sets the value of cell 1 in document 2 to that of the value of cell 1 in document 1: tell application "Numbers" to set value of cell 1 of table 1 of sheet 1 of document 2 to (value of cell 1 of table 1 of sheet 1 of document 1) You'd probably want to use the actual names vs. 1 & 2, so there's no ambiguity which document you're getting the value from and setting it to in the other doc. – user3439894 Nov 15 '17 at 20:09

You must log in to answer this question.

Browse other questions tagged .