Shortcuts and the Numbers App

Support for the Numbers app in shortcuts is pretty limited, and, except as noted below, consists of opening, creating, and exporting a spreadsheet. I’ve included below a few other options.

There is not an action to get the values of a spreadsheet, and one alternative is to to use an AppleScript. Because shortcuts do not understand AppleScript’s missing value constant, the following shortcut instead returns a “No Value” string when a cell is blank.

Get Spreadsheet Values.shortcut (21.6 KB)

Similarly, setting the value of a cell requires use of an AppleScript.

Set Spreadsheet Value.shortcut (21.5 KB)

You can use the action entitled Add Row to Top or Bottom Row of Table to both add a row and to set the values in the new row. This shortcut requires that you specify the target spreadsheet.

Add Spreadsheet Row with Values.shortcut (22.2 KB)

A few comments:

  • The first two of the above shortcuts assume that a Numbers spreadsheet is open. If it’s not, an action should be added to open the spreadsheet.

  • You can apparently use JavaScript instead of an AppleScript in some of the above shortcuts (see video here).

I copied the JavaScript from the video linked above, and the following is the shortcut. The timing results for this shortcut and the AppleScript version were essentially identical.

Set Spreadsheet Value with JavaScript.shortcut (21.5 KB)