Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
naulerich
 
Posts: n/a
Default Importing .txt file

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!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Importing .txt file


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

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

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

Does that help?


Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=529257

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Importing .txt file

You have an active thread in .misc.


naulerich wrote:

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!


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
naulerich
 
Posts: n/a
Default Importing .txt file

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.

"SteveG" wrote:


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

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

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

Does that help?


Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=529257


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
naulerich
 
Posts: n/a
Default Importing .txt file

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

"naulerich" wrote:

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.

"SteveG" wrote:


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

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

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

Does that help?


Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=529257




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ronald Roberts
 
Posts: n/a
Default Importing .txt file

naulerich wrote:

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

"naulerich" wrote:


Steve,
--cut--


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


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Importing .txt file


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


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=529257

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing MM:SS From Tab Delimited File and Charting Bryan Charts and Charting in Excel 4 July 28th 06 04:14 PM
importing csv file godzooky Excel Discussion (Misc queries) 2 March 13th 06 09:12 PM
importing file cindy Excel Discussion (Misc queries) 1 January 17th 06 02:50 PM
Formatting a .txt file / fixed width kteicher Excel Discussion (Misc queries) 0 January 10th 06 09:02 PM
save excel file from a table delimited file (.txt) using macros sedamfo New Users to Excel 1 February 15th 05 04:19 AM


All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"