473,624 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Importing text files in to Access

I have a large amount of log files from an electronic contro tester that I
need to import in to an Access database
Unfortunately, they are not comma delimited or fixed with but different
fields are on separte lines

MO NO 123456
serial no xyz
date

Obviously , the Access import wizard can not handle this format.
Can any one give me any advice on how I my import this data in to an
existing Access table?

thanks in advance
Dave
Nov 12 '05 #1
2 4319
In your example:
MO NO 123456
serial no xyz
date
1. Search the file for the string "MO NO " and replace with an empty string
"".

2. Search for Chr(13) & Chr(10) & "serial no " and replace with a comma
",".

3. Search for Chr(13) & Chr(10) & "date " and replace with a comma ",".

4. You can now import the file as a comma delimited file.

P
"Debbie CD UK" <mi*******@hotm ail.com> wrote in message
news:10******** ********@iris.u k.clara.net... I have a large amount of log files from an electronic contro tester that I
need to import in to an Access database
Unfortunately, they are not comma delimited or fixed with but different
fields are on separte lines

MO NO 123456
serial no xyz
date

Obviously , the Access import wizard can not handle this format.
Can any one give me any advice on how I my import this data in to an
existing Access table?

thanks in advance
Dave

Nov 12 '05 #2
"hal boyles" <ha********@tim einc.com> wrote in message news:<bk******* ***@inntp-m1.news.aol.com >...
No format, no import.
I suggest using Word or Excel to celan the data first.


If you have a lot of these things to import, I would put them all into
the same directory and then loop through the directory and process
each one...

1. Clean with Word.
2. Save cleaned copy in new directory.
3. Move "raw" copy to a "processed" directory.
4. Loop through the files in the "processed directory" and import
them.

If you use the Dir function, you can loop through all the files in a
folder and process them individually. You could just do something
like record a macro in Word that did your Find/Replace routines, and
just call it from within your Access code (be sure to include a
reference to your Word library if you use early binding). Then you
could import the processed files using Access. (I would save them as
CSV or text files)
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
3394
by: Grim Reaper | last post by:
I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for the last field, it only checks the top few 'cells' to see if there is any data, if not, the field is not imported). How do I 'force' Access to import the field, regardless if there is data in the top of the field or not? For instance, I might...
1
2786
by: D Mat | last post by:
Hi, I'm trying to get MS Access 2000 to automatically import a series of (~200) flat text, tab delimited, data files into a single Access table, with consistent fields and rows. The files have different, but somewhat logical naming structures (ex.Jun01.txt, Jun02.txt, Jul01.txt, etc...). Is there a relatively simple way to accomplish this, considering i'm new to Access. I was especially hoping to do this without having to manually...
1
3668
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am trying to avoid this extra step. can access read in this file directly into a table as append data? thank you very much for any pointers
14
1881
by: MLH | last post by:
GHudson has working procedures posted at http://www.access-programmers.co.uk/forums/showthread.php?t=66320 They work. Relationships, however, and some minor default settings are not preserved. Reestablishing some default settings and settings is a small price to pay for a set of text files that may save your database from total loss #AND# seem to remove the database bloat as well. I was wondering if someone knew how to preserve the...
3
2608
by: James | last post by:
Hi, I'm importing some csv files with this code /// start of code snippet int iPos = strFileName.LastIndexOf(@"\"); string strPath = strFileName.Substring(0,iPos); string strSelect = "Select * from ";
5
3165
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All districts have used the same excel template and populated the same 32 data fields (columns). I created one large excel file from all 49 files which gives me a master table of 60,000 or so records. I have tried to import this master table into access...
2
4766
by: denisel | last post by:
Hi, We will be conducting surveys through SurveyMonkey online and will be importing the answers by tab delimited or comma delimited file into access. I was wondering if there is specific way to import delimited files into Access or Is there a specific way I should design the survey online so Access can recognize the file? Here is my table structure to give you an idea on where I'm coming from. Thank you so much in advance!!! ...
2
2720
by: Debbiedo | last post by:
I have a text file that I am importing into an Access table that was generatred from data exported from a Word file. Several (about 20-30) fields are from check boxes on the Word form. These fields have either 0 (Not checked) or 1 (Checked). Due to requirements from a third party software application, they HAVE to be either Y(Checked) or N (Not checked) and MUST be a text field in the Access table. I will be importing several thousand of...
1
1984
by: Kosmos | last post by:
Hey guys, I'm fairly familiar with access by now, but I've never worked with importing text into an access database. I have some fairly large text files (lets say, for example, a folder of 20 text files could be about 120 mb with each text file being 6 mb). I know that Access has some strict limitations on fields and their sizes and I've learned to stay away from using memos. The files are encoded health files and so they have a '~' to...
1
3221
by: aconti74 | last post by:
Hello I am new to vba programming/coding. I am writing a program that goes through a directory of text files and imports them into the database. The problem is eventually the database gets to big and needs to be compacted. I know how to compact on exit but how do you do it in a loop using vba? My old program in basic did it because it was external to access. Any ideas? 1.import text file 2.loop - check size
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2603
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.