Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Sivapriya_d
Creator
Creator

Downloading file from external site

Hi All,

I am trying to download a specific file from website. My requirement is to download the file from website and place it in Share folder.

Is it possible in QlikView? Can any one help me on this??

Thanks,

Siva

1 Reply
andrey_krylov
Specialist
Specialist

Hi, Sivapriya. I know exactly, that you can download a file via FTP using macro

Function FtpFile(vType, vWebSite, vUserName, vPassword, vLocalFolder, vRemoutFolder, vFileName)

  Dim oShell : Set oShell = CreateObject("Wscript.Shell")

  Dim vftp : vftp = "FTP.ftp"

  With CreateObject("Scripting.FileSystemObject")

   With .CreateTextfile(vftp, True)

     .WriteLine "open " & vWebSite

     .WriteLine "user " & vUserName

     .WriteLine  vPassword

     .WriteLine "binary"

     .WriteLine "lcd " & vLocalFolder

     .WriteLine "cd " & vRemouFolder

     .WriteLine vType & vFileName

     .WriteLine "Close"

     .WriteLine "Quit"

     .Close

   End With

   oShell.Run "ftp.exe -i -n -s:" & vftp, 0, True

   .DeleteFile vftp

  End With

  End Function

or download a webpage with macro as well.


set xmlhttp = CreateObject ("msxml2.xmlhttp.3.0")

xmlhttp.open "get", "YourURL" , false

xmlhttp.send

vText = xmlhttp.responseText