Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 madhubabum
		
			madhubabum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Experts
I have one zip file with 10 Excel files .
How to Unzip files in Qlikview (With out using Any Software like 7Z,Winrar,unzip,......etc)
Note : I don't want to install any software (Extract/Unzip data with Qlikview Script)
Thanks
 petter
		
			petter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Actually you can do it by using the COM Shell which is built-into every single Windows by either using PowerShell or VBScript. This is the same unzip that your Windows Explorer file manager is using.
Here is the PowerShell version of it:
$shell_app=new-object -com shell.application
$filename = "myExcelFiles.zip"
$zip_file = $shell_app.namespace((Get-Location).Path + "\$filename")
$destination = $shell_app.namespace((Get-Location).Path)
$destination.Copyhere($zip_file.items(),0x14)            0x14 means overwrite and don't prompt or show progress
Here is a one-liner of VBscript that does exactly the same:
CreateObject("shell.application").NameSpace("c:\users\a-user\downloads\destdir\").Copyhere CreateObject("shell.application").NameSpace("c:\users\a-user\downloads\p.zip").items() , 20
20 at the end means overwrite and don't show progress or prompt... if you remove the parameter you see the regular progress window ...
It has to be put in a .vbs file
This can be executed from the load script by using EXECUTE.
Like this:
EXECUTE cmd /c unzip.vbs;
A much more readable and understandable version of the VBscript would be:
set shellApp = CreateObject("shell.application")
set zip = shellApp.NameSpace("c:\users\petter\downloads\testzip\p.zip")
set dest = shellApp.NameSpace("c:\users\petter\downloads\testzip\")
dest.Copyhere zip.items() , 20
 
					
				
		
 gautik92
		
			gautik92
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		have a look at this
 
					
				
		
 mayankraoka
		
			mayankraoka
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This is the way you can do unzip.But you should have 7zip already installed:
To unzip the file from qlikview and script and then reload:
execute "c:\Program Files\7-Zip\7z.exe" e "C:\Ifilelocationpath\TABLE.zip" -y -oc:\destination\
Regards,
Mayank
 petter
		
			petter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can use PowerShell which is included with any Windows - but not necessarily activated. The best is to use the latest PowerShell 5 - which gives the most complete functionality for handling ZIP-files. PowerShell use the .NET built-in System.IO.Compression namespace which provides it with the necessary methods.
If you Google "Use PowerShell to Extract Zipped Files" and go to the Microsoft TechNet site you will find a recipe.
 petter
		
			petter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Actually you can do it by using the COM Shell which is built-into every single Windows by either using PowerShell or VBScript. This is the same unzip that your Windows Explorer file manager is using.
Here is the PowerShell version of it:
$shell_app=new-object -com shell.application
$filename = "myExcelFiles.zip"
$zip_file = $shell_app.namespace((Get-Location).Path + "\$filename")
$destination = $shell_app.namespace((Get-Location).Path)
$destination.Copyhere($zip_file.items(),0x14)            0x14 means overwrite and don't prompt or show progress
Here is a one-liner of VBscript that does exactly the same:
CreateObject("shell.application").NameSpace("c:\users\a-user\downloads\destdir\").Copyhere CreateObject("shell.application").NameSpace("c:\users\a-user\downloads\p.zip").items() , 20
20 at the end means overwrite and don't show progress or prompt... if you remove the parameter you see the regular progress window ...
It has to be put in a .vbs file
This can be executed from the load script by using EXECUTE.
Like this:
EXECUTE cmd /c unzip.vbs;
A much more readable and understandable version of the VBscript would be:
set shellApp = CreateObject("shell.application")
set zip = shellApp.NameSpace("c:\users\petter\downloads\testzip\p.zip")
set dest = shellApp.NameSpace("c:\users\petter\downloads\testzip\")
dest.Copyhere zip.items() , 20
 petter
		
			petter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Did you try out the suggestion I provided?
 
					
				
		
 madhubabum
		
			madhubabum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Working fine
Thanks
 petter
		
			petter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Good  could you please close the thread by marking it as answered?
 could you please close the thread by marking it as answered?
Hi petter.skjolden
I was trying to unzip a web file (sharepoint file). But it is not unzipping the file. Even I'm not getting any popup if I use
MsgBox(Err.Description).
Can you please help me? I'm not good in VBS.
 petter
		
			petter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can't unzip a web file. Unzipping works only on local files. So the file has to be downloaded first from SharePoint and then it can be unzipped.
