By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,665 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Import CSV file that is currently zipped

P: n/a
I have a CSV file that is downloaded twice a day.
The file comes zipped (And they won't change it for me)

Is it possible to open the Zipfile and a import the file contained with
in it?

(I'll have the user browse to the Zip file, then my code should open
the zip and pull out the CSV file)

I want to use VBA to open the CSV file and then add it to a recordset
once I have ran a few functions on it.

Thanks in advance for any help.

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
wo*******@yahoo.com wrote:
I have a CSV file that is downloaded twice a day.
The file comes zipped (And they won't change it for me)

Is it possible to open the Zipfile and a import the file contained with
in it?

(I'll have the user browse to the Zip file, then my code should open
the zip and pull out the CSV file)

I want to use VBA to open the CSV file and then add it to a recordset
once I have ran a few functions on it.

Thanks in advance for any help.

Check out the Shell function. You can also check out
http://www.mvps.org/access for API functions. One of them opens the
application file based on the associated extension.

You might want to make this a 2 step process. Create a command button
to do a FileOpen and get the zip file name. (see API functions at web
link http://www.mvps.org/access for FileOpen dialog box). Once found,
run the API call to open the Zip or Shell function. Then press a
command button to import.

You may be able to automate it more based on your naming schemes of the
zip and csv file. I don't know if you are overwriting the same zip file
name each time or opening the zip file with the rest of the CSV and csv
files.
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.