Import | and ¦ Delimted Text Files

P

Peter Schmidt

I wish to import a delimited text file where the bar character (|) is used as
the column delimiter and the broken pipe (¦) is used as the record delimiter.
The standard import does not allow you to specify the record delimiter.

The file contains unquoted text that contains punctuation and return
character codes so I can't even do a search and replace on the file prior to
import.

Any suggestions please?
 
P

PieterLinden via AccessMonster.com

Peter said:
I wish to import a delimited text file where the bar character (|) is used as
the column delimiter and the broken pipe (¦) is used as the record delimiter.
The standard import does not allow you to specify the record delimiter.

The file contains unquoted text that contains punctuation and return
character codes so I can't even do a search and replace on the file prior to
import.

Any suggestions please?

FWIW, I can only think of one way to process the file. If the file is not
too big, you could use Line Input to read the file's contents into a string
variable and then use Split(<broken pipe>) to break the string into records
and then use Split(<bar character>) to break the "records" into individual
field values. Once you have that, you can use an append query or a recordset
to append the records to your table.
 

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