Applescript to Freeze certain Header Rows and Columns for open Numbers doc

Is there a way to write an AppleScript that I can run each time I open a Numbers file so that I can quickly freeze Header Row 1 and Header Column 3? I have to do this repeatedly, so I'd like a way to automate it. Thanks!

iMac (M1, 2021)

Posted on Aug 31, 2023 8:33 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 31, 2023 9:44 AM

In Script Editor:


tell application "Numbers"

tell table 1 of sheet 1 of front document

set header row count to 1

set header column count to 3

end tell

end tell


You may have to adjust the part table 1 of sheet 1 to suit your document.

Some instructions here:

https://iworkautomation.com/numbers/script-menu.html

Similar questions

3 replies

Aug 31, 2023 10:13 AM in response to Recycleur

You asked to freeze so these two additional commands should do the trick. I just noticed that when opening a CSV the headers are not automatically frozen.


tell application "Numbers"

tell table 1 of sheet 1 of front document

set header row count to 1

set header rows frozen to true

set header column count to 3

set header columns frozen to true

end tell

end tell

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Applescript to Freeze certain Header Rows and Columns for open Numbers doc

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.