Re: Comma delimited paragraph
Re: Comma delimited paragraph
- Subject: Re: Comma delimited paragraph
- From: David Gregg <email@hidden>
- Date: Thu, 18 May 2017 09:08:03 -0600
Here is a method using standard AppleScript. This is assuming the original content is already on the clipboard.
set originalContent to the clipboard
set values to every word of originalContent
set csvContent to ""
repeat with i from 1 to count of values
set csvContent to csvContent & item i of values
if i < (count of values) then set csvContent to csvContent & ","
end repeat
set the clipboard to csvContent
return the clipboard
> On May 18, 2017, at 8:03 AM, email@hidden wrote:
>
> Hello,
>
> I have a list of 10 digit order number that come from a variety of sources, including excel spreadsheets and email. I’m trying to figure out how to copy the list and format the clipboard
> to be comma delimited, deleting any carriage returns, empty lines, spaces, etc
>
> What I have is:
>
>
> 2666402402
> 2666838403
> 2651918574
> 2603572532
> 2524040907
> 2570477380
> 2557200473
> 2576205981
> 2665747816
> 2673705862
> 2660671146
>
>
> or: 2666402402: 2666838403, 2651918574 2603572532, 2524040907 2570477380 2557200473 2576205981
> 2665747816 2673705862 2660671146
>
>
> What I need is:
>
> 2666402402,2666838403,2651918574,2603572532,2524040907,2570477380,2557200473,2576205981,2665747816,2673705862,2660671146
>
>
> Any help GREATLY appreciated!
>
> AG
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden