Is there a way to access a menu or list of all the sheets in a Numbers document, so I can quickly jump to one specific sheet without having to scroll or page one-by-one with the previous/next keyboard shortcuts?
I am looking for something similar to how the right-click on the sheet's tab will bring up a list of all the tables and graphs on that Sheet, so you can jump right to a specific table or graph.
Best Answer
The only way I know of is to AppleScript it and use some mechanism to trigger the script, e.g. an Automator Service1.
As an example, pressing ⌃⌘S in Numbers with a Stocks.numbers document opened and frontmost, I get a
choose from list
dialog box as shown in the next image:I then selected sheet 1-Year History and then clicked OK and was taken to that sheet in the document. Note that double-clicking on any list item takes one to that sheet directly without having to click OK or press Enter. (You can also type the first character of the list item or use down/up arrow keys too.)
Obviously with a Numbers document that has only five sheets this isn't really necessary, and is just an example for when the document has the number of sheets that would necessitate scrolling through the sheets tabs in the document to get to the one wanted. On my MBP 15" Retina display, I was able to see 37 sheets without having to scroll in the Go To Sheet... list box. (This will vary based on the screen resolution and height of the Dock.)
Create an Automator Service1 as show in the next image:
Example AppleScript code:
AppleScript Code Note: As far as I know, Numbers does not have an explicit AppleScript command to select a given sheet and this is sort of an alternative method and it does cause a saved document to show as edited temporarily, even though it's not altering the value of the target cell, and resolved by the code in the System Events tell block. It works by setting the value of
cell "A1"
to it's current value, so while it's perceived as an edit, no data has been altered from its current value and if it was already saved, the modified date/time stamp shouldn't change. This works for me in Numbers 5.1 in macOS High Sierra on a read-write document, and is why I use it. As coded, it is not intended to be used on a locked or read-only document. Additional coding would be necessary for that scenario.For System Preferences > Keyboard > Shortcuts > Services:
Note: Sometimes with an Automator Service1 and assigning a keyboard shortcut, you may first have to trigger it from the target App's Services menu one time. From then on the keyboard shortcut should work normally.
1 In macOS Mojave an Automator Service is called a Quick Action.
Note: The example AppleScript code is just that and sans the included error handling does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.