import online text in .csv format

Joined
Dec 12, 2005
Messages
68
Reaction score
0
Points
6
I am trying to import a list of words from an online web page using a .csv (comma separated value) import option on the web page.

When I click on the .csv option on the web page, I have tried to import the text with various software, including TextEdit, TextWrangler, and Microsoft Word and Excel for Mac. Both Word and Excel offer .csv support but I have not been able to import the text list in the desired fashion.

Here is how the text currently imports (vertical arrangement):

word1
word2
word3

Here is how I need the text to import (horizontal arrangement with commas):

word1,word2,word3

Any tips on how I can import text in the desired horizontal fashion are greatly appreciated.
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
I can't say 'for sure', but it sounds like the csv file is not set up correctly. Or you are expecting something from what the creator intended. If you think the csv file is wrong, contact the creator.

A simple way to check it is to open up Terminal.app, type the word, cat, at the command line and drag the file to the terminal window, then hit the return key. If you get what you have described, a word per line, then there are inappropriate end of line characters after each field. The only way I can think to fix that is to write a script.

Perhaps Excel has a custom import option. Maybe TextWrangler has the ability to create a repetitive macro.

If the number of words per row are exactly the same, then a script is easy enough to write. If the number of words vary, then one needs to know the data to have a chance to fix it.
 
OP
S
Joined
Dec 12, 2005
Messages
68
Reaction score
0
Points
6
The text on the web page is arranged in a single column of words (top to bottom), so perhaps the .csv file is just following this arranged format of the words from the web page. So I'm importing these words or short phrases (1-3 word strings) that appear as a list on the web page.

Perhaps the best way to illustrate this is to visit the web page I'm dealing with. The web page address is below, but takes a quick explanation as to how to create the .csv download option.

Once the user has reached the web page, there is a blank box into which the user types any word or phrase, like "receipes", "car mechanics" or "spring fashions" (type without quotes). Then a list of complimentary words appear related to that original word or phrase. On the right hand side of the word list is an "add" link that allows the user to add the words to a "selected keywords" list on the right hand side of the screen. For the purposes of a test, a user could just add the top 3-4 words or phrases.

Now the .csv option is functional, and also appears on the right hand side of the screen, along with the selection of words or phrases to import.

Here is the web page address:

https://adwords.google.com/select/KeywordToolExternal
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
Looking at the page result and the csv file, I'd say they match. The words are in one column in both. You'll need to write a script to separate them further.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top