How to paste comma delimited text?

If I copy a comma delimited string of numbers from a website, how can I paste these into Numbers so they are each in a cell? The numbers are always horizontal in the website and that's how I'd like them to appear in Numbers.


When I paste now, they all paste into the same cell.

Posted on May 24, 2011 6:24 AM

Reply
3 replies

May 24, 2011 6:41 AM in response to 4thSpace

Already asked and answered several times.

Numbers is able to import a CSV file, not to receive a CSV clipboard contents.


You may use one of my scripts.

--{code}

--[SCRIPT csv2tsv]

(*

Enregistrer le script en tant que Script ou Progiciel : csv2tsv.xxx

déplacer le fichier ainsi créé dans le dossier

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


copiez vos données depuis la page source

menu Scripts > csv2tsv

le presse-papiers contiendra des valeurs séparées par TAB

que vous pourrez coller où vous voulez.


--=====


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.

(* à vérifier avec Snow Leopard *)

Cochez la case "Afficher le menu des scripts dans la barre de menus".


+++++++++


Save the script as Script or Application Bundle: csv2tsv.xxx


Move the newly created file into the folder:

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


copy datas from the source page


menu Scripts > csv2tsv


The clipboard will contain TAB separated values

which you may paste where you want.


--=====


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/09/09

*)


on run

set enTexte to the clipboardastext

set enTexte to my remplace(enTexte, ",", tab)


set the clipboard toenTexte

end run


--=====

(*

replaces every occurences of d1 by d2 in the text t

*)

on remplace(t, d1, d2)

local l

set AppleScript's text item delimiters to d1

set l to text items of t

set AppleScript's text item delimiters to d2

set t to l as text

set AppleScript's text item delimiters to ""

return t

end remplace


--=====

--[/SCRIPT]

--{code}


It convert the ridiculous set of CSV datas in a clean, universal TSV set which you will be able to paste.

CAUTION : it's a dumb one which use brute force to replace commas by TAB so, if there is a comma in a value, this one will be splitter into two values.


Yvan KOENIG (VALLAURIS, France) mardi 24 mai 2011 15:39:23


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 !

May 24, 2011 7:25 AM in response to 4thSpace

4thSpace wrote:


(1) I put them into a CSV and imported without issue. Thanks.


(2) I have times such as 3:00, 2:20, 1:30. Once imported, they are all AM times. These are actually PM though. Is there some quick way to have Numbers default them to PM if after 12:00 and later?

(1) good news


(2) as far as I know, the asked feature is unavailable.

It's the kind of drawback of the AM/PM format which explain why I never use it.


Yvan KOENIG (VALLAURIS, France) mardi 24 mai 2011 16:25:25


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 !

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to paste comma delimited text?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.