Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 

Macro Qlikview data to FTP


i used this code to copy a file to the SFTP no error displayed when i running the macro  but the file is not copied

Sub FTPUpload

Set oShell = CreateObject("Shell.Application")

Set objFSO = CreateObject("Scripting.FileSystemObject")

'Path to file or folder to upload

path = "C:\Users\Documents\AJOUUUTTTTT.TXT"


On Error Resume Next

Const copyType = 16

'FTP Wait Time in ms

waitTime = 80000

'Configuración FTP

FTPUser = "**************"

FTPPass = "**************"

FTPHost = ""

FTPDir = "**************"

strFTP = "ftp://" & FTPUser & ":" & FTPPass & "@" & FTPHost & FTPDir

Set objFTP = oShell.NameSpace(strFTP)

'Upload single file

If objFSO.FileExists(path) Then
MSGBOX 'test'
Set objFile = objFSO.getFile(path)

strParent = objFile.ParentFolder

Set objFolder = oShell.NameSpace(strParent)

Set objItem = objFolder.ParseName(objFile.Name)

objFTP.CopyHere objItem, copyType

End If

WScript.Sleep waitTime

End Sub


1 Reply
MVP & Luminary
MVP & Luminary

It looked that you used this code-example: FTP Connect and Upload Code Script. Assuming that this code is really working it seems that your FTP-path variable isn't quite correct - you may return it within a msgbox and putting the result within the windows explorer to check if the access in general worked.

If the path is really correct and it didn't work it could be caused from not appropriate user-rights (maybe you could check it with another one) or that the connection is blocked from any security tool like a firewall or rules to the open ports or similar stuff.

- Marcus