Multiple Sheets in Numbers
Is there any way to find a particular sheet if there is many sheets in one file, say 57 sheets in one file?
Is there any way to find a particular sheet if there is many sheets in one file, say 57 sheets in one file?
That's a lot of sheets for one Numbers document! You might be better off splitting your document up into separate documents and finding them in Finder.
However, AppleScript can help you find a sheet.
The script below allows you to choose the sheet from a vertical list.
It could easily be modified so you type in part of its name and it will find the first matching sheet.
(To use, copy-paste into Script Editor, which is in Applications > Utilities. With the Numbers document open, click the triangle 'run' button. It can also be placed in an Automator Service and run with a keyboard shortcut.)
SG
tell application "Numbers"
tell document 1
set sheetNames to sheets's name
choose from listsheetNames
set active sheet to sheet (result as text)
end tell
end tell
That's a lot of sheets for one Numbers document! You might be better off splitting your document up into separate documents and finding them in Finder.
However, AppleScript can help you find a sheet.
The script below allows you to choose the sheet from a vertical list.
It could easily be modified so you type in part of its name and it will find the first matching sheet.
(To use, copy-paste into Script Editor, which is in Applications > Utilities. With the Numbers document open, click the triangle 'run' button. It can also be placed in an Automator Service and run with a keyboard shortcut.)
SG
tell application "Numbers"
tell document 1
set sheetNames to sheets's name
choose from listsheetNames
set active sheet to sheet (result as text)
end tell
end tell
Hi Sinoj13,
With your present setup I think AppleScript is the way for you to go.
If your document is running well and/or would break if you split it up you might consider rearranging tables so that you have less sheets with more tables on each sheet. It is easy to jump to a specific table using the triangle next to the sheet name. If you decide to do this, back up your file and then, cut and paste the tables into their new locations. When cut, Numbers preserves the links in formulas when the table is pasted into its new sheet.
I believe that SG even has a script that navigates both sheets and tables if you forget where a table went.
quinn
Hi SGIII
Thank you so much for your response. It solved at least half of my problem. I understand that it is not a standard process, but it was easy to scroll and find out the details from sheets. But when the number of sheets exceeded a certain limit, it became difficult.
If we can search for words in the sheet name (e.g. there are sheet names such as , blue, orange, yellow, white etc and if we want to find a sheet by name blue by typing that from something like a find option, it would have been much easier)
Regards,
Sinoj
Hi Quinn,
Thank you so much for your response as well, appreciate it. I think i should try something as you said
Thanks & Regards,
Sinoj
Sinoj13 wrote:
If we can search for words in the sheet name (e.g. there are sheet names such as , blue, orange, yellow, white etc and if we want to find a sheet by name blue by typing that from something like a find option, it would have been much easier)
For that you can try something like this:
tell application "Numbers"
tell document 1
display dialog ¬
"Find sheet whose name contains:" default answer "" buttons "Ok" default button "Ok"
set searchTerm to result'stext returned
repeat with s in sheets
if s's name contains searchTerm then
set active sheet to s
return
end if
end repeat
end tell
end tell
SG
Dear SGIII
Thank you so much for the help, however it does not repeat the search if there is multiple sheets with the same content event hough the code shows some lines to manage if there is multiple sheets that contains the same name. Appreciate if you can solve that as well.
Meanwhile, I would like to know how we can learn the basic syntax and help to do the script like this. I mean which programming language and stuff like that.
Thanks & Regards,
Sinoj
Sinoj13 wrote:
it does not repeat the search if there is multiple sheets with the same content event hough the code shows some lines to manage if there is multiple sheets that contains the same name. Appreciate if you can solve that as well.
Try the script below.
The language is AppleScript. It enables non-programmers to do lots of useful things to extend the features of Numbers and other apps. The site https://macosxautomation.com/applescript/ is useful to learn about how to use it with Numbers and the other iWork apps. Macscripter.net is also helpful. If you do a web search you can find many practical examples that you can adapt to your own needs.
SG
tell application "Numbers"
tell document 1
display dialog ¬
"Find sheet(s) whose name contains:" default answer ¬
"" buttons "Ok" default button "Ok"
set searchTerm to result'stext returned
set foundSheets to {}
repeat with s in sheets
if s's name contains searchTerm then ¬
copy s to end of foundSheets
end repeat
set counter to 1
repeat with s in foundSheets
set active sheet to s
if (countfoundSheets) > counter then
display dialog "Go to next sheet whose name contains " & ¬
"'" & searchTerm & "'" buttons {"Next", "Cancel"} default button "Next"
end if
set counter to counter + 1
end repeat
end tell
end tell
Dear SGIII,
Thank you so much and it was indeed a great help for me. Really appreciate your time and effort..... would love to try the applescript soon.
Thanks & Regards,
Sinoj
Multiple Sheets in Numbers