Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
rupalimane1390
Contributor III
Contributor III

download Zip file from Web in qlik

Hello All,

 

Is it possible to download zip file from website in Qlikview?

It is not possible using web connectors as I tried. Please help if we have execute commands or can make use of macros to download zip files from website.

 

Thank you.

Labels (2)
1 Solution

Accepted Solutions
cwolf
Creator III
Creator III

With macro:

function DownloadFile(url,localFile)
	Set xHttp = createobject("MSXML2.XMLHTTP.6.0")
	Set bStrm = createobject("Adodb.Stream")
	xHttp.Open "GET", url , False
	xHttp.Send
	
	with bStrm
	    .type = 1 '//binary
	    .open
	    .write xHttp.responseBody
	    .savetofile localFile, 2 '//overwrite
	end with
	DownloadFile="ok"
end function

Calling from script:

let df=DownloadFile('https://ayera.dl.sourceforge.net/project/qmsedx/12.50/qmsedx_12.50.0.zip','c:\temp\qmsedx_12.50.0.zip');

View solution in original post

3 Replies
cwolf
Creator III
Creator III

With macro:

function DownloadFile(url,localFile)
	Set xHttp = createobject("MSXML2.XMLHTTP.6.0")
	Set bStrm = createobject("Adodb.Stream")
	xHttp.Open "GET", url , False
	xHttp.Send
	
	with bStrm
	    .type = 1 '//binary
	    .open
	    .write xHttp.responseBody
	    .savetofile localFile, 2 '//overwrite
	end with
	DownloadFile="ok"
end function

Calling from script:

let df=DownloadFile('https://ayera.dl.sourceforge.net/project/qmsedx/12.50/qmsedx_12.50.0.zip','c:\temp\qmsedx_12.50.0.zip');
rupalimane1390
Contributor III
Contributor III
Author

Thank you so much for your reply.

Will try this.

rupalimane1390
Contributor III
Contributor III
Author

Thanks a ton @cwolf. It worked 🙂