Import txt file to excel 2010

Itaybill

New Member
Joined
May 19, 2009
Messages
38
Hi All

i have a text file that i would like to import to excel.
the text file contains several columns, and seperated by commas.
There is a row of free text that causes me a lot of trouble: in most of the rows there is an extra space between the words, that creates new row in the excel (after import) in the first column! (the free text column is one of the last columns in the text file).

what can be done to prevent this? correcting the text file is not an option, because there are a lot of rows there...


Thanks!


Itay
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Do you think you could show us an example of your text file, an example of what it looks like when you import it and an example of what you want it to look like?
 
Upvote 0
example of the text file (the gaps in the second row appear in the text file as well)

Job ID,Init ID,T ID,Date,Host PC Name,Machine Name,Error Message,Stop Reason, S Number
122009,122009 ,122009,08/30/08,VWAGWOCE,O500,Stopped
2440285,244028 ,244028,09/02/08,VWAGWOCE,O500,This tray was prepared for building in High Q mode using material While the system is loaded with: X material Y material Use Wizard to change desired material .

example of the excel file (after import - i added only the second row):

Job ID Init ID Tray ID Date Host PC Name Machine Name Error Message
2440285 244028 244028 09/02/08 VWAGWOCE O500 This tray was prepared for building in
High Q mode using material
While the system is loaded with:
X material
Y material

Use Wizard to change desired material


i expecte to see the "Error message" row without any spaces and in one sentence.


Itay
 
Upvote 0
It's not giving me any trouble at all. I copied your sample and saved it as a *.txt file, then imported it with a comma as a delimiter. The error message went into a single cell.

It could be that someone opened your text file in notepad with word wrap enabled and then saved it, creating unwanted line breaks in your source data. To be honest though, I'm clueless as to what the cause is. Maybe someone else has a good suggestion.
 
Upvote 0

Forum statistics

Threads
1,224,532
Messages
6,179,388
Members
452,908
Latest member
MTDelphis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top