Hi Peggy
Are you really getting quotes around values like 1 or 2 or 3 ?
I never got them.
Here I get the double quotes around values embedding a comma.
,1,2,"2,5","la, pluie",lapin,55,"5,6",87,,
To get the double quote enclosing every value, I use this script:
--
--[SCRIPTclipboard2CSVfile]
(*
Enregistrer le script en tant que Script, Application ou Progiciel :clipboard2CSVfile.xxx
déplacer le fichier créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:
Copiez la table à exporter dans le Presse-papiers.
menu Scripts > clipboard2CSVfile
Le script créera un fichier CSV dans lequel toutes les valeurs sont encadrées par des guillemets.
--=====
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:clipboard2CSVfile.xxx
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:
Coopy the table to export into the clipboard
menu Scripts > clipboard2CSVfile
The script will create a CSV file in which every cell value is enclosed between double quotes.
--=====
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)
7 juillet 2009
*)
on run
set fName to (do shell script "date " & quote & "+_%Y%m%d-%H%M%S" & quote) & "." & "csv"
set p2d to path to desktop
tell application "System Events" to make new file at end of p2d with properties {name:fName}
set enTexte to quote & my remplace(the clipboard as text, tab, quote & "," & quote) & quote
write enTexte to file ((p2d as text) & fName)
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]
Yvan KOENIG (from FRANCE mardi 7 juillet 2009 19:19:50)