Automating import of a certain type of 'txt' file

S

Stuart

Using the text import wizard (and recording a macro) gives:

Workbooks.OpenText Filename:= _
vFilename & FilesArray(LoopCounter), _
Origin:=xlWindows, StartRow:=13, _
DataType:=xlFixedWidth, FieldInfo:= _
Array(Array(0, 1), Array(13, 2), Array(71, 1), _
Array(73, 1), Array(109, 1))

for the initial 'formatting'.

Is there a way to bypass the wizard, programmatically, but such
that code will automatically pick up minor differences in the original
file format?

I have used Ron's excellent Gooogle Search extensively, and found
Chip Pearson's routine, which requires the variable 'Sep', as a
delimiter.

I see no suitable delimiter in this type of file.

The files are known as CITE files (Construction Industry
Trading Electronically) and as such, are to UK Standards.

When the originating program exports the file......4 files are created.
I think 3 are information/control files.

The one being imported has the extension.. '.EBQ' and seems
to hold the data.

Would anyone be interested in receiving a small attachment
(17kb) containing just the .EBQ file to see if you can help me further,
please?

Regards.
 

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