Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Workbooks That Are Zipped Be Imported To A Table

Status
Not open for further replies.

dominicdunmow

Technical User
Jul 28, 2004
125
CA

I have a DB that automatically imports (using vba code)an xl workbook. The source of the originator of the Workbook now wants to zip it.

Is there any way that Access can import Zipped files?
 
Hi

In VBA, how about using Shell() to unzip it, import what you want, then discard the unzipped version with Kill

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken,

Thanks for your response, I've tried the shell() method you suggest but unsuccessfully. I found thread181-886536 which asked the same question.

Blorf provided tha answer in the code below:-

Function UnzipIt()
dim Sc as string
dim X as integer
sc = ""
sc = sc & "C:\progra~1\winzip\winzip32 -e -o "
sc = sc & "Your Zip File Path & Name "
sc = sc & "The Path you want to Unzip to"
X = shell (sc)
end function

This will open the winzip file I want, but can't seem to find the file within the zip that I want.

Can you see what is wrong?

Thanks
 
Hi

sorry if this seems a stupid question but...

you have put your own file paths in the lines:


sc = sc & "Your Zip File Path & Name "
sc = sc & "The Path you want to Unzip to"


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 

Yes, I did that and it the zip file on my desktop opened, but the file was not there when the code did it. When I go back into the zip on the desktop it is there.

I wonder whether the code just opens winzip and names a new folder the name that's in the code - rather than opening the zip file that I am stipulating.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top