

Tested in Script Editor and in a Run AppleScript action in Automator. Substitute your user name for sg3, or get the whole path via the terminal as described above. Tell application "System Events" to keystroke "v" using If you've specially formatted the table and want to preserve the format you can use If you typically do have blank rows a small change in the script can handle that. It does its thing much faster than a script that inserts values cell by cell.Īs written the script assumes you do not have any blank rows at the bottom of the table. You'll notice when you click a Numbers cell once and command-v to paste values the table expands automatically as much as needed. This script mimics the manually pasting of tabbed clipboard contents into a Numbers cell. This is one of those rare situations where so-called "gui scripting" is noticably more efficient than having a script assign values to cells one-by-one, especially if you have quite a few new rows to insert. If you are uncertain of the whole path of your document you can locate it in Finder and drag it onto an open window in Terminal, then insert that result into the script. (The script won't complain if the document happens to be open already when you run it.) Just insert your document's path and name, the target sheet name, and the target table name in the property statements in the script below. Yes, it is quite easy to have a script have Numbers open a document, insert tabbed values from the clipboard, and close the document. Is it possible to have something like this without Numbers actually open, please: I want to put it into Automator and have the whole thing run unattended?
