Importing .txt file

G

Guest

I have a .txt file that looks like:

"123","test text","this is a test","abc"

I want my output in excel to be the following:

A1=123
B1=test text
C1=this is a test
D1=abc

Potential problem is that there are commas through out the "test text" and
"this is a test" columns therefore text to columns wont work. However what I
need to show in each separate column is enclosed in quotes.

Any help would be appreciated!
 
S

SteveG

Do you mean there are not commas separating the text? If you do hav
commas, Text to columns would work using the comma as the delimiter.

If there are commas then when you chose Text to Columns, use th
Delimited option instead of Fixed and select the comma as th
delimiter.

If there are no commas use the quotation mark as the delimiter b
selecting the Other option and typing in a ". When you hit next, yo
will have blank columns in between your desired text. Click on a blan
column in step three and chose the Do Not Import option. Do this fo
each of the blank columns then click Finish.

Does that help?


Stev
 
D

Dave Peterson

You have an active thread in .misc.

I have a .txt file that looks like:

"123","test text","this is a test","abc"

I want my output in excel to be the following:

A1=123
B1=test text
C1=this is a test
D1=abc

Potential problem is that there are commas through out the "test text" and
"this is a test" columns therefore text to columns wont work. However what I
need to show in each separate column is enclosed in quotes.

Any help would be appreciated!
 
G

Guest

Steve,

There are commas seperating the text but also throughout the data there for
I am unable to use as the delimiter. I will try using the quotes.
 
G

Guest

It is not working....I have changed the delimiter...removed the quotes...what
next?
 
R

Ronald Roberts

naulerich said:
It is not working....I have changed the delimiter...removed the quotes...what
next?

:

I'm not sure I understand the problem. I just took your data :

"123","test ,text","this is a test","abc"

1. Added a comma after the test and before text.
2. saved it as a txt and a csv file.
3. opened both file and the loaded as expected.

Ron
 
S

SteveG

I am not sure of an easier way but once I imported, if I understand you
correctly, you want to remove all commas from between the text now. I
just highlighted the columns that had text with commas between it,
Ctrl-H to Find Replace. In the Find I put a "," and in Replace with a
space. Click Replace All. That will replace your commas with spaces
between your text. I tried the same as Ron suggested but still had
commas remaining between the text.

HTH

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top