7 Replies Latest reply: Mar 3, 2013 3:01 AM by fred6633
Rasuul Level 1 Level 1 (0 points)

I am adding a bunch of new contacts to my address book and it would be ideal to enter their info in a Numbers spreadsheet (for general management); however, Numbers affixes a semi-colon as the separate instead of a comma and, as such, Address Book does not recognize the resultant CSV file. Seems strange to me that they would not be designed to interface seemlessly, given that they are both native programs, any thoughts?

 

All the best,

 

 

Rax Adam

  • 1. Re: Export to CSV using Numbers '09 - how to get commas, not semi-colons?
    Jerrold Green1 Level 7 Level 7 (28,990 points)

    Rax,

     

    My thought is that your localization uses the comma as the decimal separator, so to avoid conflict it uses a semicolon for the field separator. You could open your "CSV" file in a text editor or word processor and change the semicolons to commas. Check first to make sure of what is going on with the decimal separators if your file has any decimal fractions.

     

    Jerry

  • 2. Re: Export to CSV using Numbers '09 - how to get commas, not semi-colons?
    Level 8 Level 8 (41,760 points)

    It's one of the proof of the fact that there is no coordination between different teams in Apple.

     

    Temporarily set your system so that it use the decimal period (thru the General System's preferences pane)

    but don't change the language.

     

    Restart the machine.

    Open your Numbers document

    Export your doc as CSV

    Import the file in AddressBook

    Reset your decimal separator to comma

    Restart.

     

    The tip described by Jerrold may work but it may give odd result if some fields are containing semi-colons.

     

    Yvan KOENIG (VALLAURIS, France) lundi 5 septembre 2011 12:22:45

    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

  • 3. Re: Export to CSV using Numbers '09 - how to get commas, not semi-colons?
    Level 8 Level 8 (41,760 points)

    Alternate answer :

     

    Selct all the cells of the source table.

    Copy to the clipboard.

    Run this old script :

     

    --{code}

    --[SCRIPTclipboard2textFile]

    (*

    Enregistrer le script en tant que Scriptl :clipboard2textFile.scpt

    déplacer le fichier créé dans le dossier

    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:

     

    Copiez les données à exporter dans le Presse-papiers.

     

    menu Scripts > clipboard2textFile

     

    Le script créera un fichier texte.

     

    --=====

     

    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, an Application or an Application Bundle:clipboard2textFile.xxx

     

    Move the newly created file into the folder:

    <startup Volume>:Users:<yourAccount>:Library:Scripts:

     

    Coopy the datas to export into the clipboard

     

    menu Scripts > clipboard2textFile

     

    The script will create a text file.

     

    --=====

     

    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)

    2009/07/07

    *)

     

    --=====

     

    on run

              try

                        set enTexte to the clipboard as text

                        set fName to (do shell script "date " & quote & "+_%Y%m%d-%H%M%S.txt" & quote)

     

                        set p2d to path to desktop

     

                        tell application "System Events" to make new file at end of p2d with properties {name:fName}

     

                        write enTexte to file ((p2d 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

     

    --=====

     

    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

     

    --=====

    --[/SCRIPT]

    --{code}

     

    The result will be a text file with values separated by TABs which every version of AddressBook accepts as entry.

     

    Yvan KOENIG (VALLAURIS, France) lundi 5 septembre 2011 13:41:57

    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

  • 4. Re: Export to CSV using Numbers '09 - how to get commas, not semi-colons?
    Jerrold Green1 Level 7 Level 7 (28,990 points)

    Yvan,

     

    I'm glad to see that you found this discussion.

     

    Jerry

  • 5. Re: Export to CSV using Numbers '09 - how to get commas, not semi-colons?
    Level 8 Level 8 (41,760 points)

    In fact, like a dumb, I was searching two or three days ago when it was a yesterdays thread.

     

    Yvan KOENIG (VALLAURIS, France) lundi 5 septembre 2011 23:51:32

    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

  • 6. Re: Export to CSV using Numbers '09 - how to get commas, not semi-colons?
    Rasuul Level 1 Level 1 (0 points)

    ***** Yvan - c'est geniale! C'est tout a fait ce que je cherchais comme solution.

     

    En fait - je cherces a apprendre comment ecrire mes propres scripts, mais je n'sais pas par ou commencer. Avez vous des suggestions?

     

    De toutes facon, je me rendre compte que c'est pas la premiere fois que vous repondez une de mes questions - merci beaucoup pour toute votre aide, c'est bien apprecier!

     

    Mille mercie & a bientot, certainement!

     

     

    ~ Rax

  • 7. Re: Export to CSV using Numbers '09 - how to get commas, not semi-colons?
    fred6633 Level 1 Level 1 (0 points)

    Thanks for that script. I have big problems with importing to Filemaker from Numbers. This made the trick. Is it possible to add in the script that the output file shall be in UTF-8 format?

     

    It would spare me some time if I didn't have to convert every file to UTF-8.