Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I export multiple zipped files using WinRAR in QlikView..... Need help on this...
Try this
Function Unzip(strFileName,strFolderName)
Dim objshell
Dim objfso
Set objshell = CreateObject("Shell.Application")
Set objfso = CreateObject("Scripting.FileSystemObject")
If Not objfso.FolderExists(strFolderName) Then objfso.CreateFolder strFolderName
objshell.NameSpace(strFolderName).CopyHere
objshell.NameSpace(strFileName).ItemsSet
objfso = NothingSet objshell = NothingEnd Function
Unzip "C:\Users\Shailesh Kumar\Desktop\Test\UAE iAgentByApplicationState Dump - 2015-01-05.zip","C:\Users\Shailesh Kumar\Desktop\Test"
Do you mean to export data from QlikView into QVD's or CSV files and compress them into a rar archive? From the Load script?
Peter
Hi Peter .. thanks for the quick reply...
But I want to load data directly from ZIP file or something that can automatically extract CSV files from ZIP and store in a specific folder... So that I need not to manually export CSV from ZIP every time...
Hope I am able to explain my requirement....
Hi Ande Gomes,
I have tried the below script but getting an Error....
--------------------------------------------------------------------------------------------
Error: Expected end of statement'....
Code: 800A0401
--------------------------------------------------------------------------------------------
Function Unzip(strFileName,strFolderName)Dim objshellDim objfso
Set objshell = CreateObject("Shell.Application")
Set objfso = CreateObject("Scripting.FileSystemObject")
If Not objfso.FolderExists(strFolderName) Then objfso.CreateFolder strFolderName
objshell.NameSpace(strFolderName).CopyHere
objshell.NameSpace(strFileName).ItemsSet
objfso = NothingSet objshell = NothingEnd Function
Unzip "C:\Users\Shailesh Kumar\Desktop\Test\UAE iAgentByApplicationState Dump - 2015-01-05.zip","C:\Users\Shailesh Kumar\Desktop\Test"
this error is on Line: 1 and Char: 58
Try this
Function Unzip(strFileName,strFolderName)
Dim objshell
Dim objfso
Set objshell = CreateObject("Shell.Application")
Set objfso = CreateObject("Scripting.FileSystemObject")
If Not objfso.FolderExists(strFolderName) Then objfso.CreateFolder strFolderName
objshell.NameSpace(strFolderName).CopyHere
objshell.NameSpace(strFileName).ItemsSet
objfso = NothingSet objshell = NothingEnd Function
Unzip "C:\Users\Shailesh Kumar\Desktop\Test\UAE iAgentByApplicationState Dump - 2015-01-05.zip","C:\Users\Shailesh Kumar\Desktop\Test"
thanks its working fine....
Great!!! 😉
Try this
Sub TestRun()
'Change this as per your requirement
Call UnZip("folder to export the files","Zip file full path")
Call UnZip("D:\New\UNZIP", "D:\New Resume\fwd.zip")
End Sub
Sub UnZip(strTargetPath, Fname)
If Right(strTargetPath, 1) <> "\" Then
strTargetPath = strTargetPath & "\"
End If
FileNameFolder = strTargetPath
Set oApp = CreateObject("Shell.Application")
oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(Fname).items
End Sub
Regards
Harsha