Prev: bootmngr missing
Next: help
From: Evan on 18 Jan 2010 17:11 So I have a massive amount of data files I am trying to compile together into a database. The appropriate structure of the database itself is an issue, but I have far more pressing problem that I will have to tackle before I can do anything else. The data files represent conditions and results for discreet "runs". Each run gets 2 data files. One is a tab delimited .txt and the other is a .csv. The .txt file is laid out like this i = Field identifier f = Field/data = blank space an identifier applies to data below it i i i i i f f f f f i i i i i f f f f f i i i i i f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f The second file (.csv) looks like this: i f i f i i i i i i i i i i f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f where the top two identifiers/field combos apply left to right, the other ones are vertical. -------------- Anywho. Is there ANY way to import these files without severely reformating my data and/or write some VBA stuff to pull it in? Ugh, I wish I could catch the people that made these data files before they generated years of data in these terrible formats. Submitted via EggHeadCafe - Software Developer Portal of Choice SQL Server Stored Procedure Scripts By Dependency http://www.eggheadcafe.com/tutorials/aspnet/ad30d309-c488-4070-8db8-37aad7fc9103/sql-server-stored-procedu.aspx
From: GeoffG on 18 Jan 2010 18:33 To program the reading of a text file and write the data to an Access table: 1. With a reference to "Microsoft Scripting Runtime" (in the VBA editor), you could use the TextStream object to read a text file. The following article gives a code example: http://msdn.microsoft.com/en-us/library/aa263346(VS.60).aspx 2. The VBA Split() function may help you chop up a line after reading it. 3. You could write data to an Access table using the methods in the "Microsoft DAO Object Library". Success may depend on whether the data has been written to the text files consistently. Programming a solution may be a challenge if you don't already have skills in these areas. Suggest you explore the Microsoft website for coding examples. Geoff "Evan Morris" wrote in message news:2010118171127emorris1000(a)hotmail.com... > So I have a massive amount of data files I am trying to > compile together into a database. The appropriate > structure of the database itself is an issue, but I have > far more pressing problem that I will have to tackle > before I can do anything else. > > The data files represent conditions and results for > discreet "runs". Each run gets 2 data files. One is a tab > delimited .txt and the other is a .csv. > > The .txt file is laid out like this > > i = Field identifier > f = Field/data > = blank space > > an identifier applies to data below it > > i i i i i > f f f f f > > i i i i i > f f f f f > > i i i i i > f f f f f > f f f f f > f f f f f > f f f f f > f f f f f > f f f f f > > The second file (.csv) looks like this: > > i f > i f > > i i i i i i i i i i > f f f f f f f f f f > f f f f f f f f f f > f f f f f f f f f f > > where the top two identifiers/field combos apply left to > right, the other ones are vertical. > -------------- > > Anywho. Is there ANY way to import these files without > severely reformating my data and/or write some VBA stuff > to pull it in? > > Ugh, I wish I could catch the people that made these data > files before they generated years of data in these > terrible formats. > > > Submitted via EggHeadCafe - Software Developer Portal of > Choice > SQL Server Stored Procedure Scripts By Dependency > http://www.eggheadcafe.com/tutorials/aspnet/ad30d309-c488-4070-8db8-37aad7fc9103/sql-server-stored-procedu.aspx
|
Pages: 1 Prev: bootmngr missing Next: help |