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

I can't get the row number of the current selection

Hi all,

How can I get the row number of a selection if I don't know the range selected? I need it to store in variable.

I've tried in many ways, but unsuccesfully.

Thank's in advance.

Imac, Mac OS X (10.6.6), Numbers 09

Posted on Feb 9, 2011 7:59 AM

Reply
Question marked as Best reply

Posted on Feb 9, 2011 8:04 AM

Ratz0246 wrote:
Hi all,

How can I get the row number of a selection if I don't know the range selected? I need it to store in variable.


There is an answer to this question in quite half the scripts which I posted here.

Search for the string *_script AND yvan_* to reach some of them.

Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:04:12
6 replies
Question marked as Best reply

Feb 9, 2011 8:04 AM in response to Ratz0246

Ratz0246 wrote:
Hi all,

How can I get the row number of a selection if I don't know the range selected? I need it to store in variable.


There is an answer to this question in quite half the scripts which I posted here.

Search for the string *_script AND yvan_* to reach some of them.

Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:04:12

Feb 9, 2011 8:22 AM in response to KOENIG Yvan

If you already know the document's name, the sheet's name and the table's name, the easy way is :

--

--Here you may replace the three values by the current ones
set dName to 1
set sName to 1
set tName to 1
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
tell first cell of the selection range to set {rowNum1, columnNum1} to {address of its row, address of its column}
tell last cell of the selection range to set {rowNum2, columnNum2} to {address of its row, address of its column}
end tell
--


Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:22:21

I can't get the row number of the current selection

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