473,473 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Another multiple file import question

Hi I have searched and found lots of stuff and played with some but
couldnt get anything to even remotely work. I have a directory with
multiple .csv files i would like to import them all into a
corresponding table. Names run seqentially from cell01 - cellx but may
not all be present. It would not be an issue if an empty table was
created as i could manually sort that but a pointer in the right
direction would be great.

Glyn Rowling

Nov 13 '05 #1
2 1293

splasho...@yahoo.com wrote:
Hi I have searched and found lots of stuff and played with some but
couldnt get anything to even remotely work. I have a directory with
multiple .csv files i would like to import them all into a
corresponding table. Names run seqentially from cell01 - cellx but may not all be present. It would not be an issue if an empty table was
created as i could manually sort that but a pointer in the right
direction would be great.

Glyn Rowling


You could use the BrowseFolder API
(http://www.mvps.org/access/api/api0002.htm) to prompt the user for a
folder. If you want the system to remember it, you could stuff the
value into a table or into a custom property. then on to the looping
through files. use the Dir function. I know there are examples here
somewhere... I think either Albert Kallal or Brendan Reynolds posted it
a few years ago... (maybe 2000, I don't remember anymore...)

but the basic plan is this:
1. use BrowseFolder API to specify the path you want.
2. store (or not) the path you just chose.
3. use the DIR function to loop over the files in a folder
4. and process each file individually. (moving processed files
elsewhere?)

Albert K has code somewhere for a progress meter, I think... then you
could
(between 2 and 3) get a count of all files in the directory to process
process file (showing filename somewhere...)
update progress meter.

I just like that with processes that take a long time so I know things
are still working. Otherwise, people figure something's wrong because
it takes so long and give your working app the three-finger salute and
kill it.

Nov 13 '05 #2
pi********@hotmail.com wrote:
You could use the BrowseFolder API
(http://www.mvps.org/access/api/api0002.htm) to prompt the user for a
folder. If you want the system to remember it, you could stuff the
value into a table or into a custom property. then on to the looping
through files. use the Dir function. I know there are examples here
somewhere... I think either Albert Kallal or Brendan Reynolds posted it a few years ago... (maybe 2000, I don't remember anymore...)

but the basic plan is this:
1. use BrowseFolder API to specify the path you want.
2. store (or not) the path you just chose.
3. use the DIR function to loop over the files in a folder
4. and process each file individually. (moving processed files
elsewhere?)


Perhaps this is what you're thinking of:

http://groups-beta.google.com/group/...0410ec42d02213

Although in this example the user chooses the file to process, it's not
hard to change it into a processing loop.

BTW, OON, Albert's idea of using menus to mimic the behavior of
standard windows programs is brilliant. I have only used a few menu
items and didn't consider using them for New, Open.., etc. in the
context of records.

James A. Fortune

Nov 13 '05 #3

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

Similar topics

1
by: rzantow | last post by:
I currently have both 2.3 and 2.4 on my Win2k computer. For the most part, I've been able to run each version, but I'm not configured completely correctly and I've run into a snafu. I downloaded...
4
by: Indra | last post by:
Hi There, I am looking for information on how to import the txt or csv file to the multiple table in sql 2000. If you have any kind of inf. please let me know wheather we can do this and how. ...
8
by: Paul Cochrane | last post by:
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to...
3
by: Odawg | last post by:
Hello All Database (Access) Guru's, I am a novice when it comes to databases and I know enough to get simple information for my needs. With that said, I was given an opportunity for improvement...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
10
by: Tom Plunket | last post by:
I've got a bunch of code that runs under a bunch of unit tests. It'd be really handy if when testing I could supply replacement functionality to verify that the right things get called without...
7
by: Pete | last post by:
I need to import multiple tab delimited files for which I do not have the formats. All files have column headers in the the line. The files must be dynamic. The only common value is that the...
1
by: RossGK | last post by:
Newbie questions on PyDev project setup. Things are going fine - writing python code in eclipse/pydev and running them with various imports etc, doing wxpython stuff blah, blah, blah. My .py code...
0
by: Gary Herron | last post by:
Dan Yamins wrote: Because loading (and reloading) assigns values to variables (called binding a value in Python), but does not go on a hunt to find variables to *unbind*. Once a variable is...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
1
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...
0
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.