[SOLVED] Possible to manipulate certain things in a Numbers file?

I have a spreadsheet from Numbers and it contains 14 sheets like this

And I would like to rename those sheets based on KM variables, but also, on each sheet, make some changes to some cells such as renaming them.

Is this possible at all?

Found this link that seems to use AppleScript to rename a table (which is a light at the end of the tunnel):
https://discussions.apple.com/thread/7217112?sortBy=best

One step closer: I was able to edit the content of a specific cell in a specific sheet, which is great

tell application "Numbers"
	tell front document
		tell sheet "Sheet 1-1"
			tell front table
				set the value of cell "A8" to "Abc"
			end tell
		end tell
	end tell
end tell

If I can rename a sheet, that will be amazing!

Try this:

tell application "Numbers"
	tell front document
		tell sheet "Sheet 1-1"
			set name to "Fred"
		end tell
	end tell
end tell

Obviously, "Fred" can be whatever you wish!

3 Likes

I hate it when it's this obvious and I didn't think about it right away...
It worked like a charm! You have no idea how that will help me with a group of macros I'm working on!
Thank you so much! :slight_smile:

2 Likes