Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > How to create a tab or Comma delimitted file from a text list

How to create a tab or Comma delimitted file from a text list
Thread Tools
creativemind
Fresh-Faced Recruit
Join Date: Feb 2002
Status: Offline
Reply With Quote
Oct 2, 2006, 06:40 PM
 
"How to create a tab or Comma delimitted file from a text list"

Hello everyone
I needed your help.,

I have this email list of roughly 3,000 email address (no it's not being used for spam). A friend is using this list for their business but the problem is that the person who provided it to them gave to them in a plain text list. No a tab or comma delimitted file format. So until it gets onto one of those formats it cannot be imported into their emial program.

So this is what the list looks like, just one email address per line, no comma's no tabs just like this:
[email protected]
[email protected]
[email protected]

I need to get them into a tab or comma delimitted format so they can import them into email program.

For the life of me I can not figure out a simple way of doing this?
I tried in Excel to open the list there and save as "CSV" but it did not work.

Please provide me with suggestions, thank a lot.
Robert
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Oct 2, 2006, 06:51 PM
 
This person needs some mailing list management software. Many mail-relays place restrictions on the number of recipients allowed in a single message, this will need to be broken up into smaller bite sized chunks. Mailman is decent mailing list software, I'd look into this if this is an option.

What you'll probably have to do is write up a quick Perl script to generate the output you want. This is a very simple script... something like the following (this is just written off the top of my head, I haven't tested this, but this ought to be extremely close if not bang on:


Code:
#!/usr/bin/perl $output = ""; while ($line = <STDIN>) { $output .= $line . ","; } chop($output); print $output;
Give the script executable permissions and run it as such:

Code:
cat /path/to/addresslist | /path/to/script.pl > output.csv
This will create your output.csv file which should hopefully be your list of addresses! You can confirm this by typing:

Code:
cat output.csv
This will display the contents of this file in your Terminal.
     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Oct 2, 2006, 07:05 PM
 
Perl scripts are fancy and cool, but to replace the returns with tabs you can just use the Search-dialog of TextEdit. Use option-return and option-tab to enter those into the dialog and click the "Replace All" button. Convert the document into Plain Text beforehand if it isn't already.
( Last edited by TETENAL; Oct 2, 2006 at 07:38 PM. )
     
creativemind  (op)
Fresh-Faced Recruit
Join Date: Feb 2002
Status: Offline
Reply With Quote
Oct 2, 2006, 07:30 PM
 
Originally Posted by TETENAL
Perl scripts are fancy and cool, but to replace the returns with tabs you can just use the Search-dialog of TextEdit. Use alt-return and alt-tab to enter those into the dialog and click the "Replace All" button. Convert the document into Plain Text beforehand if it isn't already.
In the find area, how do I input "alt-return and alt-tab" into the replace?

What do I put where it says: Find:?
What do I put where it says: Replace: ?

What shoudl the other settings be set to?
Ingnore case (X) wrap around (x) Contains/Starts with/Full word (which?)

Do I tell it to:
Replace all Replace Replace and Find Previous Next
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Oct 2, 2006, 07:32 PM
 
Heh... I guess Tetenal's suggestion is a little easier than mine.

Oh well, a Perl script would have been appropriate if the conversion was more complicated I guess...
     
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Oct 2, 2006, 07:48 PM
 
I could do it quickly in Word. Find and replace all the paragraph marks with a comma and a space, then save the file with the ".csv" extension (for cross platform utility). I've done this sort of thing for HUGE files of data that I needed to be able to import into all sorts of programs.

Glenn -----OTR/L, MOT, Tx
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Oct 2, 2006, 07:52 PM
 
Originally Posted by creativemind
In the find area, how do I input "alt-return and alt-tab" into the replace?
You hold in the alt (or option) key and press return or tab.

Originally Posted by creativemind
What do I put where it says: Find:?
You're trying to replace line breaks, so you type option-return as TETENAL said.

Originally Posted by creativemind
What do I put where it says: Replace: ?
Either option-tab if you want a tab-delimited list or a comma if you want a comma delimited list.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
creativemind  (op)
Fresh-Faced Recruit
Join Date: Feb 2002
Status: Offline
Reply With Quote
Oct 2, 2006, 08:36 PM
 
Okay I tried it and it did place tab's between them, thanks.

But Entourage tells me the text file is still not correctly formatted, any idea?
     
creativemind  (op)
Fresh-Faced Recruit
Join Date: Feb 2002
Status: Offline
Reply With Quote
Oct 2, 2006, 09:00 PM
 
i also did what ghporter said in word, and that did format it with tabs just fine. But still it is not correct. Entoruge does not import anything though I see the tab delimitted email adress there.

Little more help?
TIA
Creativemind (rob)
     
chabig
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status: Offline
Reply With Quote
Oct 2, 2006, 09:17 PM
 
Creativemind,

I think the original file you got from your friend is already in the correct format! You want one email address per line. Tab-delimited files have tabs between each element on every line. Because you only have one element per line, your file is already perfect.

So I think your problem is that you don't know how to import into Entourage, not that your file isn't correct.

Have you tried the Import Wizard (from the File menu)?

Chris
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:36 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,