Numbers: sorting by results
i have a list, part of which are figures put in manually, others that are the result of a calculation.
To sort that column, what I normally did in Excel was to export as txt file, then reimport, and then do the recalculation.
What's the way to do it for Numbers?
Here is an other script achieving more tasks than the first one.
--{code}
--[SCRIPTtable2textFile]
Enregistrer le script en tant que Script : table2textFile.scpt
déplacer le fichier créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Sélectionner au moins une cellule dans la table à exporter.
menu Scripts > table2textFile
Le script créera un fichier texte avec le contenu de la table
puis ouvrira celui ci dans Numbers.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
+++++++++
Save the script as a Script : table2textFile.scpt
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select at least one cell in the table to export.
menu Scripts > table2textFile
The script will create a text file with the table's contents and will open it in Numbers.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
+++++++++
Yvan KOENIG (Vallauris FRANCE)
2011/08/07
--=====
on run
local dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2, enTexte, fName, p2t
my activateGUIscripting()
try
set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
Select every cells of the table *)
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
set selection range to range ("A1:" & name of last cell)
end tell
Copy to clipboard *)
my raccourci("Numbers", "c", "c")
delay 0.2
Extract the clipboard contents *)
set enTexte to the clipboard as text
Build an unique fileName *)
set fName to (do shell script "date " & quote & "+_%Y%m%d-%H%M%S" & quote) & "." & "txt"
Grabs the pathname of Temporary Items folder*)
set p2t to path to temporary items from user domain
Create a new text file *)
tell application "System Events" to make new file at end of p2t with properties {name:fName}
Store the table contents in the text file *)
write enTexte to file ((p2t as text) & fName)
Open the text file in Numbers *)
tell application "Numbers" to open ((p2t as text) & fName)
on error
if my parleAnglais() then
error "The clipboard doesn’t contain text data. Maybe you selected a Numbers sheet !"
else
error "Le presse-papiers ne contient pas de données texte. Vous avez peut-être copié une feuille de Numbers !"
end if
end try
end run
--=====
set { dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
on get_SelParams()
local d_name, s_name, t_name, row_num1, col_num1, row_num2, col_num2
tell application "Numbers" to tell document 1
set d_name to its name
set s_name to ""
repeat with i from 1 to the count of sheets
tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
if maybe is not 0 then
set s_name to name of sheet i
exit repeat
end if -- maybe is not 0
end repeat
if s_name is "" then
if my parleAnglais() then
error "No sheet has a selected table embedding at least one selected cell !"
else
error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
end if
end if
tell sheet s_name to tell (first table where selection range is not missing value)
tell selection range
set {top_left, bottom_right} to {name of first cell, name of last cell}
end tell
set t_name to its name
tell cell top_left to set {row_num1, col_num1} to {address of its row, address of its column}
if top_left is bottom_right then
set {row_num2, col_num2} to {row_num1, col_num1}
else
tell cell bottom_right to set {row_num2, col_num2} to {address of its row, address of its column}
end if
end tell -- sheet…
return {d_name, s_name, t_name, row_num1, col_num1, row_num2, col_num2}
end tell -- Numbers
end get_SelParams
--=====
on decoupe(t, d)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to oTIDs
return l
end decoupe
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
on activateGUIscripting()
(* to be sure than GUI scripting will be active *)
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true
end tell
end activateGUIscripting
--=====
==== Uses GUIscripting ====
This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
It may be used to 'type' keyboard raccourcis if the third parameter describe the required modifier keys.
I changed its name « shortcut » to « raccourci » to get rid of a name conflict in Smile.
on raccourci(a, t, d)
local k
tell application a to activate
tell application "System Events" to tell application process a
set frontmost to true
try
t * 1
if d is "" then
key code t
else if d is "c" then
key code t using {command down}
else if d is "a" then
key code t using {option down}
else if d is "k" then
key code t using {control down}
else if d is "s" then
key code t using {shift down}
else if d is in {"ac", "ca"} then
key code t using {command down, option down}
else if d is in {"as", "sa"} then
key code t using {shift down, option down}
else if d is in {"sc", "cs"} then
key code t using {command down, shift down}
else if d is in {"kc", "ck"} then
key code t using {command down, control down}
else if d is in {"ks", "sk"} then
key code t using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
key code t using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
key code t using {command down, shift down, option down}
end if
on error
repeat with k in t
if d is "" then
keystroke (k as text)
else if d is "c" then
keystroke (k as text) using {command down}
else if d is "a" then
keystroke k using {option down}
else if d is "k" then
keystroke (k as text) using {control down}
else if d is "s" then
keystroke k using {shift down}
else if d is in {"ac", "ca"} then
keystroke (k as text) using {command down, option down}
else if d is in {"as", "sa"} then
keystroke (k as text) using {shift down, option down}
else if d is in {"sc", "cs"} then
keystroke (k as text) using {command down, shift down}
else if d is in {"kc", "ck"} then
keystroke (k as text) using {command down, control down}
else if d is in {"ks", "sk"} then
keystroke (k as text) using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
keystroke (k as text) using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
keystroke (k as text) using {command down, shift down, option down}
end if
end repeat
end try
end tell
end raccourci
--=====
--[/SCRIPT]
--{code}
Yvan KOENIG (VALLAURIS, France) dimanche 7 août 2011 21:53:05
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
My iDisk is : <http://public.me.com/koenigyvan>
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !
Similar Messages
-
With a Custom Search portlet how to Sort the Result By Sequence. i.e. by respecting arrangements of the items in the page of contents?
Actually the Results Options "Order By" are : Create Date, Author, Creator, Date Updated, Display Name, Last Update by, Publish Date, Score.
Is there an action to add the "Sequence" Order By result Option?
Great thanks for your kind help.
Best regardsNo, I agree that it is functionality that should be added to the product, but it
is not a bug because it was not written to do this.
It is a short coming of the product.
Cheers,
Ersan -
I've found no way to sort search results in itunes. For example, if I type the group "Rush" into the search bar, I get a list of songs recorded by rush and literally thousands of other songs and artists with the word rush in them. There is; however, no way to sort the results.
In the Search box click on the black Arrow and UNTICK the Search Entire Library.
Then the Search results in Songs view will be displayed in the main Grid and you can sort them by clicking on the column headers.
You can also turn on the column browser which can help with filtering -
Customer request: With a Custom Search portlet how to Sort the Result By Sequence. i.e. by respecting arrangements of the items in the page of contents?
(Like it's possible in MyOracle)
Actually the Results Options "Order By" are : Create Date, Author, Creator, Date Updated, Display Name, Last Update by, Publish Date, Score.
Is there an action to add the "Sequence" Order By result Option?
Great thanks for your kind help.
Best regardsNo, I agree that it is functionality that should be added to the product, but it
is not a bug because it was not written to do this.
It is a short coming of the product.
Cheers,
Ersan -
Sorting the results returned by a Ref cursor
Hi All,
I have a scenario where i am asked to sort results returned by a ref cursor.
I have to pass the column to be sorted as the Input parameter to a stored procedure. I tried using 'order by sorting_parameter' in the ref cursor's select query, but it is not sorting the results. It is not throwing any error even.
Please help.
Many Thanks...Hi
i came across the below reply for a thread with the similar query as above.
<<
Justin Cave
Posts: 10,696
From: Michigan, USA
Registered: 10/11/99
Re: sort data in ref cursor
Posted: Feb 3, 2005 10:30 AM in response to: [email protected] Reply
No. You could sort the data in the SQL statement from which the REF CURSOR was created, but once you have a REF CURSOR, you cannot do anything but fetch from it.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC
>>
So, the results from a ref cursor cant be sorted?? There is no way out?
Kindly advise. -
How we can sort subtotal results value in abap alv report
Hi, How we can sort subtotal results value in abap alv report
Thanks a lot for your code
but i am still getting double and weird results.
Subtotal IN PARTY KGS TOTAL VALUE
1 40008 3,141.20 192,799.00
1 40008 16,681.06 1,908,659.00
Subtotal 1 19,822.25 2,101,458.00
10 40022 4,590.60 531,228.00
10 40022 3,448.27 377,173.00
Subtotal 10 8,038.87 908,401.00
100 40010 270.172 19,852.00
Subtotal 100 270.172 19,852.00
101 40036 752.898 61,051.00
101 40036 207.586 19,431.00
Subtotal 101 960.484 80,482.00
102 40048 325.936 32,154.00
102 40048 264.32 19,364.00
Subtotal 102 590.256 51,518.00
103 40066 216.134 18,088.00
Subtotal 103 216.134 18,088.00
104 40001 231.96 16,986.00
Subtotal 104 231.96 16,986.00
105 40021 585.918 65,461.00
105 40021 108.683 15,825.00
Subtotal 105 694.601 81,286.00
106 40046 209.777 15,341.00
Subtotal 106 209.777 15,341.00
107 40043 167.353 14,755.00
Subtotal 107 167.353 14,755.00
108 40046 153.023 14,343.00
108 40046 342.348 32,223.00
Subtotal 108 495.371 46,566.00
109 40008 184.085 13,483.00
Subtotal 109 184.085 13,483.00
11 40011 5,275.63 524,232.69
11 40011 6,723.28 643,911.82
Subtotal 11 11,998.90 1,168,144.51
110 40067 142.113 13,333.00
110 40067 492.883 44,428.00
Subtotal 110 634.996 57,761.00
111 40040 118.961 13,190.00
111 40040 492.433 60,029.00
Subtotal 111 611.394 73,219.00
Edited by: Timaji Sawant on Feb 16, 2012 12:16 PM
Edited by: Timaji Sawant on Feb 17, 2012 9:27 AM -
Can numbers sort by more than one column? How?
Can numbers sort by more than one column? How?
Open the "Sort & Filter" options:
Then add columns. You can set sort ASCENDING or DESCSANDING then drag the items to set the which column is sorted first -
Getting every odd-numbered row from result set
select *
from mytable
where MOD(rownum,2) = 1;
Why does this not give me every odd-numbered row from result set? It returns just 1 row....
Thank uWhen you say MOD(ROWNUM,2)=1 it will list only the first row with rowid which is devisible by 2 and gives a reminder 1.
Just tweak your query with a GROUP BY:
SQL> select rownum from your_table group by rownum having mod(rownum,2) =1;
ROWNUM
1
3
5
7
9
11
13
15
17
19
21
ROWNUM
23
25
27
29
31
33
35
37
39
41
43
etc...
[pre]
Jithendra -
hi all
In my query I got several chars: Organization, Planning Level, Date
And 3 key figures: Planned amount, Actual Amount, Plan/Actual (calculated KF)
My query got results by Organization on Plan/Actual KF (totals are averages).
Now I need to sort up all Organizations by Planning accuracy, in other words I need to sort query results by Plan/Actual KF totals based on Organization Level.
I created Condition TOP 100 % on Plan/Actual KFG with setting "Individual Chars and Char combinations" and assigning Organziation. But it seems it doesn't work.
How can I make this work?Thnx, Akshay, but I already done like you said and run into some strange behaviuor.
Than I keep it far left without Date in rows it seems ALMOST working. "Almost" because it sorts all organizations well except the last one, which is bigger then first before last, like this:
Org PLevel KFG
111 15 100
112 14 90
109 14 65
115 12 30
110 13 89
Second, it doesn't work at all than I got Date in rows (doesn't matter Organization is far left or no)...
Edited by: Gediminas Berzanskis on May 11, 2010 1:56 PM -
Hi i have created a site which does a search from our
database to get client for clients details. I want the page to
display what the client is looking for and allow them to sort the
results in the way required. The can sort by surname, Property
address, Casework , Broker, Transaction, date instructed, and date
last updated.
Any ideas.quote:
Originally posted by:
cybertek23
Hi i have created a site which does a search from our
database to get client for clients details. I want the page to
display what the client is looking for and allow them to sort the
results in the way required. The can sort by surname, Property
address, Casework , Broker, Transaction, date instructed, and date
last updated.
Any ideas.
google "javascript sort" -
[Desktop][Music] sort search results
Please restore the ability to sort search results (by song title, artists, etc). I'm on the mac desktop app. Why did you ever remove this? I often search for covers, and want to isolate the song titles from others that show up by keyword.
Updated: 2015-07-14Hello and thanks for the feedback!
Any news regarding this request will be announced in the original idea topic here:
https://community.spotify.com/t5/Live-Ideas/Bring-Back-Sorting-in-Search-Results/idi-p/757011
Please add your kudos and comments there, if you haven't already. ;) -
There used to be a "date modfied" column I could use to sort search results.
Now I can only sort by "name," "kind," and "last opened."
Since I often open the wrong version, I can't use "last opened" as a parameter.
Is there maybe a 3rd party plugin for the finder that would enable me to sort spotlight results?
Or, even easier, is there a method I'm missing?
Thanks.Pathfinder kind of takes over your whole computer. But Forklift, which costs less, gives you dual panes and is just an amazing finder tool which uses spotlight for searches but gives you date modified. 29$.
Eventually Mac will update spotlight so that it's more useful.
It seems to me that "they" seem to want to infantilize us to death.
Apple, some of us would like a few more options. We won't get too confused. Honest. -
Numbers sort feature leaves 10-20 rows unsorted
I am new to Numbers and having trouble with the sort feature. I have approximately 150 rows I need to sort by descending number in column B. When I choose sort descending from column B, only rows 20+ sort properly. The first several rows (sometimes 10, sometimes more) are repositioned, but are not sorted in descending order.
It appears to be a random number of unsorted rows each time. These rows are not being counted as header/footer rows. What am I doing wrong?
Below is a screenshot of what I get instead:
Dallas County, Texas
6.16272662955231
Camden County, New Jersey
7.53842289268443
Bexar County, Texas
7.13165979878903
Alameda County, California
9.35124058812435
Union County, New Jersey
13.7824579371627
Suffolk County, Massachusetts
12.1752925835509
District of Columbia, District of Columbia
12.0803018122768
Norfolk County, Massachusetts
11.7036709563547Is it possible that some of these cells are formatted as text and others as numbers?
The table above has the cells formatted as text and sorted descending. It is correctly sorted in descending order based on first character: 9,7,7,6,1,1 and then the second character, etc.. A mix of numbers and text would look all messed up with the topmost cells being numbers sorted numerically and the bottommost cells sorted as text.
I am not sure this explains your problem. The sort you are showing doesn't seem to fit the pattern unless some of the text "numbers" have leading spaces or something. -
Is it so difficult for Sun to sort search result and duke stars ?
In the years that I have been visiting these forums I have frequently (well every year at least) asked Sun to sort the search results by reverse date. In the last few months I have asked Sun to sort the new format of the results of "My Duke Stars". Is is so difficult to add a 'order by' clause to the SQL or am I missing something?
DrClap wrote:
It would be nice if they could do that, and I asked them too several months ago. It would also be nice if they told you how many points you got for an answer (not how many points were originally attached to the thread) and the date and time you got them (not the original date and time of the thread). But those changes might take more than just an ORDER BY clause. (Or they might be implemented by just choosing the right columns from joined tables, who knows?)They seem to have all the functionality already there, it's just spread out across two pages when it should be all on one.
http://forum.java.sun.com/myrewards.jspa
http://forum.java.sun.com/dukesummary.jspa
And has anyone ever come up with a sane explanation of all these numbers?
Balance: 474
Rewarded: 474
Awarded: 40
Duke Stars earned by program: 534
Total Duke Stars earned to date 534
Duke Stars spent to date -60
Available Balance 474 -
I know that this problem may have been asked before but I searched and could not find a similar situation.
I have a spreadsheet that will not sort the contents of a cell correctly. As an example, the table has two columns, the first is formatted as a date, the second as text data. I enter dates in random order and just put a, b, c, d etc in order in the second column. Selecting one cell in the second column, I add background color and a black line border.
When I sort using the date column, the color background moves with the letter but the black border stays at the original cell address.
Is this a bug, or have I missed a setting somewhere?Yes, it does do that. Without documentation saying what it is supposed to do, it isn't proper to call it a bug. Maybe that was an intended result. Seems kind of strange to move the fill color but not the borders but I can think of examples where you might want it that way, or the opposite way, or for both to move or neither to move.
Edit: I note that Excel 2008 does the same thing. Therefore it makes it very difficult to call it a bug. I do not know if Excel has any settings to change that behavior. To my knowledge, Numbers does not.
Message was edited by: Badunit
Maybe you are looking for
-
Erro "validadation error: Table (IT_NFE_IMP)
Boa noite Atualizamos o SP do GRC para o 15 e estamos em fase de testes. Não podemos atualizar para o 16, pois o go-live está marcado para domingo 14/11. Ainda não estamos trabalhando na versão 2.0... estamos realizando os testes para a versão 1.0 Oc
-
Mail keeps crashing and overloading processor
I am completely confused by a particual users mail issue. Every other day or so, the user gets a spinning wheel and the emails will not load as quickly as they are typically supposed to any time there is an attachment. So in troubleshooting, I recr
-
How to assign modified forms (SAP scripts etc.,) to Dunning texts
Hello, how do I assign forms (SAP scripts etc.,) to dunning texts according to no 5 above? I've copied the form f150_dunn_01 and modified it. Now I want to assign my modified form to dunning text. In txn fbmp I have created new procedure and when I c
-
the upper left hand corner of my screen does not show a tool bar with ...file....edit... etc. I cannot print because of this and would like to know how to refind or reshow the toolbar. thank you
-
Hi, We are new into SAP Fiori area and we would like to customize our theme. I have gone through many articles, but when I try to open the UI Theme Designer using the tcode. The UI theme designer opens up. When I open a standard theme, it does not al