• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sort a range of rows in Numbers.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort a range of rows in Numbers.


  • Subject: Re: Sort a range of rows in Numbers.
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 1 Feb 2009 07:58:57 -0700


On Feb 1, 2009, at 6:56 AM, KOENIG Yvan wrote:

Maybe some of you may have a better idea allowing me to really work with knownSyntax set to true.

The problem, of course, is defining the range.  By experiment, I found that a range is defined as a string containing two cells separated by a colon, e.g.:

tell application "Numbers"
tell document 1
tell sheet 1
tell table 1
range 1
end tell
end tell
end tell
end tell

--> {format:automatic, font name:"HelveticaNeue", alignment:center, font size:10.0, name:"A1:A1", class:range, text color:{0, 0, 0}, background color:{59111, 59111, 59111}, vertical alignment:top, text wrap:true}

Note that the range's name is "A1:A1".

This leads me to believe that the following script should work for a table containing rows 2 through 13:

tell application "Numbers"
tell document 1
tell sheet 1
tell table 1
sort by column 2 direction descending in rows "2:13"
end tell
end tell
end tell
end tell

Unfortunately, it doesn't.
--> "Numbers got an error: Bad sort range."

The dictionary never describes the syntax of a range; maybe someone from Apple can address that problem here.

-- Michelle

-- 
Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming, "WOW! What a ride!!!"

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Sort a range of rows in Numbers.
      • From: KOENIG Yvan <email@hidden>
References: 
 >Sort a range of rows in Numbers. (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Sort a range of rows in Numbers.
  • Next by Date: Re: Sort a range of rows in Numbers.
  • Previous by thread: Sort a range of rows in Numbers.
  • Next by thread: Re: Sort a range of rows in Numbers.
  • Index(es):
    • Date
    • Thread