importing data fram a text file

rsawning

New Member
Joined
Mar 26, 2002
Messages
1
I have a rather large text file that is comma delimited. However, there are three line breaks per row of information that cause both the row headings and the records to spread over three rows and misalign. Any clue as to how to import he file and get rid of the "hard returns"?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hmmm...sounds like it's time for SUPERWORD!

Generally, you can find/replace in text files with Word. If you can post a sample of, say three records, so I can find a pattern, I can post the finds/replaces that would work in Word, then you can import. Just put something like {BREAK} at the end of each record so I know where they end.

:)
 
Upvote 0
Hi rsawning,

The most efficient way to do this would be to read the data using VBA I/O rather than importing the file into Excel as a text file. To read a file using VBA I/O, check out the Open, Line Input #, EOF, and Close statements in the VBA helps. It really is not hard.
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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