• 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
Rép: Sort a range of rows in Numbers.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rép: Sort a range of rows in Numbers.


  • Subject: Rép: Sort a range of rows in Numbers.
  • From: KOENIG Yvan <email@hidden>
  • Date: Sun, 1 Feb 2009 19:24:16 +0100



Ed Stockly sent me the soluce.

When we read:
sort v : Sort the rows of the table.
sort table
by column : The column to sort by.
[direction ascending/descending]
[in rows range]
in the dictionary,
range doesn't mean ["B8:B25"] but means [range "B8:B25"] !

--[SCRIPT]
property myDoc : "testScript.numbers"
property mySheet : "Feuille 3"
property myTable : "Tableau 1"
property myColumn : 3

property knownSyntax : true

tell application "Numbers09"
if (name of documents) does not contain myDoc then error "The document " & myDoc & " is not open !"
tell document myDoc
if not (exists sheet mySheet) then error "There is no sheet " & mySheet & " in document " & myDoc & " !"
tell sheet mySheet
if not (exists table myTable) then error "There is no table " & myTable & " in sheet " & mySheet & " of document " & myDoc & " !"
tell table myTable
set nbRows to row count
set myRange to "A10:A30"

if knownSyntax then
sort by column myColumn direction ascending in rows range myRange
else
sort by column myColumn direction ascending
end if
end tell -- table
end tell -- sheet
end tell -- document
end tell -- application
--[/SCRIPT]


Given that, it works.

Thanks Ed.

Yvan KOENIG (from FRANCE dimanche 1 février 2009 19:18:31)




_______________________________________________ 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
  • Prev by Date: Re: Sort a range of rows in Numbers.
  • Next by Date: Re: Move files to second monitor
  • Previous by thread: Re: Sort a range of rows in Numbers.
  • Next by thread: Re: Move files to second monitor
  • Index(es):
    • Date
    • Thread