Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Any help would be appreciated.
-- Joe D |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
..GZ is a gzip compressed file format. (http://www.gzip.org/) You need to
extract the excel file from this. If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the 7zip software and can manuially open the files. I am looking for
code to uncompress them with VBA on a windows machine. Any ideas on this?? -- Joe D "Jacob Skaria" wrote: .GZ is a gzip compressed file format. (http://www.gzip.org/) You need to extract the excel file from this. If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ron de Bruin has some sample code for zipping files he
http://www.rondebruin.nl/unzip.htm You can this as the basis for your code--but he does use winzip. You'll have some minor modifications to do. Joe D wrote: I have the 7zip software and can manuially open the files. I am looking for code to uncompress them with VBA on a windows machine. Any ideas on this?? -- Joe D "Jacob Skaria" wrote: .GZ is a gzip compressed file format. (http://www.gzip.org/) You need to extract the excel file from this. If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Or if you want to use the Default zip program see
http://www.rondebruin.nl/windowsxpunzip.htm Never test it for zip files with a gz extension -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Dave Peterson" wrote in message ... Ron de Bruin has some sample code for zipping files he http://www.rondebruin.nl/unzip.htm You can this as the basis for your code--but he does use winzip. You'll have some minor modifications to do. Joe D wrote: I have the 7zip software and can manuially open the files. I am looking for code to uncompress them with VBA on a windows machine. Any ideas on this?? -- Joe D "Jacob Skaria" wrote: .GZ is a gzip compressed file format. (http://www.gzip.org/) You need to extract the excel file from this. If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have tried modifying Ron's code but unfortunately have not been successful.
I can get it to find the gz files, but not the items inside the files. Any suggestions would be appreciated. Thanks -- Joe D "Dave Peterson" wrote: Ron de Bruin has some sample code for zipping files he http://www.rondebruin.nl/unzip.htm You can this as the basis for your code--but he does use winzip. You'll have some minor modifications to do. Joe D wrote: I have the 7zip software and can manuially open the files. I am looking for code to uncompress them with VBA on a windows machine. Any ideas on this?? -- Joe D "Jacob Skaria" wrote: .GZ is a gzip compressed file format. (http://www.gzip.org/) You need to extract the excel file from this. If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Without knowing what failed, I'm gonna make a guess that you didn't have the
commandline version of 7z (7za.exe). You can find it he http://sourceforge.net/project/downl...ip&use_mirror= (I haven't used it in a long time, but I believe I went searching for this file when I needed to do this, too.) Anyway, this worked for me: Option Explicit Sub UnZip_GZFile() Dim Path7Z As String, FileNameGZ As String Dim ShellStr As String, FolderName As String Path7Z = "C:\program files\7-zip\" 'This will check if this is the path where 7za is installed. If Dir(Path7Z & "7za.exe") = "" Then MsgBox "Please find your copy of 7za.exe and try again" Exit Sub End If FileNameGZ = "C:\Data\Test.gz" FolderName = "C:\Data\" 'Unzip the zip file in the folder FolderName ShellStr = Path7Z & "7za.exe e" _ & " " & Chr(34) & FileNameGZ & Chr(34) _ & " -o" & Chr(34) & FolderName & Chr(34) ShellAndWait ShellStr, vbHide MsgBox "Look in " & FolderName & " for extracted files" End Sub Remember to include Ron's ShellAndWait code, too. And after your data is extracted, you can use Dir() to look for what you want (and open it???). Joe D wrote: I have tried modifying Ron's code but unfortunately have not been successful. I can get it to find the gz files, but not the items inside the files. Any suggestions would be appreciated. Thanks -- Joe D "Dave Peterson" wrote: Ron de Bruin has some sample code for zipping files he http://www.rondebruin.nl/unzip.htm You can this as the basis for your code--but he does use winzip. You'll have some minor modifications to do. Joe D wrote: I have the 7zip software and can manuially open the files. I am looking for code to uncompress them with VBA on a windows machine. Any ideas on this?? -- Joe D "Jacob Skaria" wrote: .GZ is a gzip compressed file format. (http://www.gzip.org/) You need to extract the excel file from this. If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D -- Dave Peterson -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
FYI
I add the Zip page today for 7-zip http://www.rondebruin.nl/7zipwithexcel.htm Next week I will create the Unzip page -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Joe D" wrote in message ... I have the 7zip software and can manuially open the files. I am looking for code to uncompress them with VBA on a windows machine. Any ideas on this?? -- Joe D "Jacob Skaria" wrote: .GZ is a gzip compressed file format. (http://www.gzip.org/) You need to extract the excel file from this. If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Will this help http://www.math.mcmaster.ca/~grasselli/john.pdf
If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sorry the below is meant for a different post.
-- If this post helps click Yes --------------- Jacob Skaria "Jacob Skaria" wrote: Will this help http://www.math.mcmaster.ca/~grasselli/john.pdf If this post helps click Yes --------------- Jacob Skaria "Joe D" wrote: Any help would be appreciated. -- Joe D |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Joe
Play with it for a few minutes You can use -y to overwrite the files if they exist ShellStr = Path7Z & "7z.exe e -y" _ & " " & Chr(34) & FileNameGZ & Chr(34) _ & " -o" & Chr(34) & FolderName & Chr(34) Or use one of the other options below like this ShellStr = Path7Z & "7z.exe e -aou" _ & " " & Chr(34) & FileNameGZ & Chr(34) _ & " -o" & Chr(34) & FolderName & Chr(34) -aoa Overwrite All existing files without prompt. -aos Skip extracting of existing files. -aou aUto rename extracting file (for example, name.txt will be renamed to name_1.txt). -aot auto rename existing file (for example, name.txt will be renamed to name_1.txt). -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Joe D" wrote in message ... Any help would be appreciated. -- Joe D |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
" %20" signs in file name when open attachement in excel | Excel Discussion (Misc queries) | |||
"Cannot access read-only document" (I get this error when I try to open an Excel file) | Excel Discussion (Misc queries) | |||
"Cannot access read-only document" (I get this error when I try to open an Excel file) | Setting up and Configuration of Excel | |||
Excel 2002/2003 can not open xls file says "may be read only" | Excel Discussion (Misc queries) |