Can I import a non-delimited data set into Access?

G

Guest

Hi, sorry for cross-posting this question but it covers both Access and Word.

I am trying to manipulate some data to eventually import into an Access db.
I have a plain text file of the data that I am getting from a web-based
database and am trying to create a tab-delimited file that I can then import
into Access. The db I am exporting the data from offers no way for me to save
it as anything other than a plain text file. The fields currently are
delimited by carriage returns only.

Is there any way for me to save the data in a Word document as a
tab-delimited file without having to manually enter tabs for each item? I'm
looking at hundreds of lines here. Or is there some way of importing into
Access using the carriage returns as a delimiter? I haven't been able to find
a way to do that so far, but I'm obviously no expert...

Any assistance I can get on this would be greatly appreciated!!

Thanks
Michael
 
J

John Nurick

Hi Michael,


If the fields are separated by newlines, what separates the records?
Often the answer is "a blank line" - i.e. two newlines in succession.
If so, use your favourite text editor, or Word, to

1) replace two successive newlines with some character or group of
characters that don't appear elsewhere in the data, e.g. "$%$". How you
do this depends on the program you're using. In TextPad, you'd search
for "\n\n"; in Word it would be "^p^p".

2) replace all remaining newlines with tab characters.

3) replace all "$%$" with CR+LF (i.e. the two characters CR and LF,
Chr(13) and Chr(10)). In most Windows text editors, if you ask for a
line break they automatically use the two characters. In Word, use the
paragraph mark "^p", which is automatically converted to CR+LF when you
save as plain text.

This process produces a tab-delimited file ready for importing into
Access.
 
G

Guest

Thanks John,

I think this is exactly the information I need. I'll give it a shot...

Michael
 

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