sample script for numbers
Do you have a sample script for numbers for extracting values from a CSV file in Numbers and putting them in a new column?
MacBook Pro (Retina, Mid 2012), Mac OS X (10.7.4), 8g ram Vectorworks Sketchup Rhino
Do you have a sample script for numbers for extracting values from a CSV file in Numbers and putting them in a new column?
MacBook Pro (Retina, Mid 2012), Mac OS X (10.7.4), 8g ram Vectorworks Sketchup Rhino
I suggest opening the CSV file in your favorite text editor (like TextEdit), then replace all the commas with Tabs,
- then save to a NEW file (just until you are certain of the procedure), then open the new CSV file in Numbers OR
- select all in the text document, copy, select any cell in a blank table (I usually select A1) then paste
William Huchting wrote:
Do you have a sample script for numbers for extracting values from a CSV file in Numbers and putting them in a new column?
Hi William,
You can try these Automator Services. They contain AppleScript that you can inspect by opening them in Automator. After the double-click installation you can navigate to the services to have a look at them as follows: in Finder hold down the option key and Go > Library > Services.
The key csvToList() "handler" (subroutine) was posted by Nigel Garvey at MacScripter.net. It handles the various csv formats encountered "in the wild" better than anything I have ever seen, about as well as the csv parser built into Excel, and that's saying a lot.
To use the Services you don't need to worry about going to the Library. Just a few clicks and a menu pick and a paste and you're done, as described below.
A. If your semicolon-separated values are still in a file ...
Install this CSV to Tabs on Clipboard Automator Service (Dropbox download) by double-clicking the downloaded .workflow package and, if necessary, "Open Anyway" in System Preferences > Security & Privacy.
Thereafter to use with Numbers 3 or Numbers 2, simply:
That's it!
B. If your semicolon-separated values are already in a column in Numbers 3 ...Install this Text to Columns Automator Service (Dropbox download) by doubleclicking the downloaded .workflow package and, if necessary, "Open Anyway" in System Preferences > Security & Privacy.
Thereafter to use with Numbers 3, simply:
That's it. This last one is similar to the 'Text to Columns' wizard in Excel.
SG
sample script for numbers