Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Get Row Count with AppleScript in Numbers 2013

Some context: Upgraded from 10.8 and Numbers 09 to 10.9 and Numbers 2013


My script has broken. It was this:


on rowCountOfTable(sheetName, tableName) local sheetName, tableName, restry
tell
application "Numbers" tell document 1 tell sheet sheetName tell table tableName set res to row count end tell
                end tell
end tell
end tell
return
res on error eMsg number eNum error "Can't rowCountOfTable: " & eMsg number eNum end try
end
rowCountOfTable


It's now been recompiled and is this:


tell «class NmSh» sheetName

tell «class NmTb» tableName

set res to row count

end tell

endtell


AppleScript now doesn't understand row so have changed this to «class NmRw» (Guessed that bit).


Doesn't matter what I do, I can't get the Row Count of a numbers table any more....


Any ideas?

MacBook Pro with Retina display, OS X Mountain Lion (10.8.3)

Posted on Dec 6, 2013 4:26 AM

Reply
Question marked as Best reply

Posted on Dec 6, 2013 5:34 AM

No Applescript support in Numbers 3. Your script won't work no matter what you do. Supposedly they are going to include some scripting capabilities in an update.


Your script, when compiled, is referring to Numbers '09, not Numbers 3. I changed my old Numbers app so it is named "Numbers 09" and if I compiled your script, it would turn "Tell application "Numbers"" into "Tell application "Number 09""


You might want to update your profile with your new OS version and Numbers version. With Numbers '08, '09 and 3 all mixed into one forum, sometimes it is hard to tell which version someone is talking about unless they state it outright (as you did).

5 replies
Question marked as Best reply

Dec 6, 2013 5:34 AM in response to Woggledog

No Applescript support in Numbers 3. Your script won't work no matter what you do. Supposedly they are going to include some scripting capabilities in an update.


Your script, when compiled, is referring to Numbers '09, not Numbers 3. I changed my old Numbers app so it is named "Numbers 09" and if I compiled your script, it would turn "Tell application "Numbers"" into "Tell application "Number 09""


You might want to update your profile with your new OS version and Numbers version. With Numbers '08, '09 and 3 all mixed into one forum, sometimes it is hard to tell which version someone is talking about unless they state it outright (as you did).

Dec 6, 2013 8:06 AM in response to Woggledog

In Numbers 3 AppleScript support is limited to GUI scripting" for now, but fuller support is supposed to be restored within the next few months. If you have any input on what form that support should take, you might try your luck with Numbers > Provide Numbers Feedback in your menu.


Meanwhile, if you need the number of rows in a table for use within Numbers (as opposed to another app) you can of course use formulas.


SG

Dec 24, 2013 7:23 AM in response to Woggledog

What has happened in the last few days I hit this problem several weeks back and found that I could use my apple script so long as I used Numbers 09. This has worked perfectly up until today but today when I try to use my apple script routine with a Numbers 09 application I find all my rows, columns have been changed to class Nm??. Even if I just open my apple script in script editor I get the same problem. Has one of the latest upgrades to Maverick changed something?


I am getting really fed up with Apple software lately nothing seems to work properly


Elbeardo

Get Row Count with AppleScript in Numbers 2013

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