LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Automating import of a certain type of 'txt' file

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.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 06/02/2004


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saved *.csv file gives SYLK file type warning upon Excel 2003 open Tom Excel Discussion (Misc queries) 5 March 19th 08 03:15 PM
How do you save an excel file to be read as IBM-type text file ? Dee Franklin Excel Worksheet Functions 2 October 10th 06 02:46 AM
Automating import of Word tables into Excel Han Excel Discussion (Misc queries) 0 January 18th 06 08:42 AM
How do I change file/open/"files of type" to default to "all file. How do I changefiles of type default Excel Discussion (Misc queries) 1 April 19th 05 10:45 PM
Automating excel file update zaw Excel Programming 0 September 29th 03 10:56 PM


All times are GMT +1. The time now is 12:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"