![]() |
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 |
Automating import of a certain type of 'txt' file
Stuart
You can send it my way. Unmunge my email address. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Stuart" wrote in message ... 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 |
All times are GMT +1. The time now is 12:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com