Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Evening All,
I have once use case, wherein we need to export list of users or any object data to secured FTP. Is there any possibility of achieving this either using macro or some other way.
Any help regarding this will be widely appreciated
Thanks in Advance
Manoj
Hi,
Try to use bat files here after getting export the excel file then store it into any folder and then by bat file export to the FTP location.
Regards
Anand
Please could you provide some sample, how to download data using macro and then intern call batch file to transfer data to ftp
Hi
We are doing SFTP to transfer files between a Unix environment and Windows environment. Unless we unintentionally overcomplicated things, its not that simple. There is quite a lot of documentation if you are prepared to spend some time googling.
As I said, its not that simple to set up, but it does work.
HTH
Jonathan
Thanks for information. Pls could you let me know how to call batch file & Qlikview macro should wait until ftp process stops.
Thanks in Advance
Can you provide some sample code to call batch file having ftp command from Qlikview macro
My code:
'****************FTP Upload
Set oShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Path to file or folder to upload
path = "C:\directory\file.csv"
Sub FTPUpload
On Error Resume Next
Const copyType = 16
'FTP Wait Time in ms
waitTime = 80000
'Configuración FTP
FTPUser = "ftp.user"
FTPPass = "pass"
FTPHost = "host ftp"
FTPDir = "/"
strFTP = "ftp://" & FTPUser & ":" & FTPPass & "@" & FTPHost & FTPDir
Set objFTP = oShell.NameSpace(strFTP)
'Upload single file
If objFSO.FileExists(path) Then
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
Please,
This macro works 100%
I need to clean the folder before including the file
FTPDir = "/ public_html"
before inserting a new one.
You have the friend to help
Can we do it for a Excel files stored in a folder? Do we need any oither installation for the same?
or directly export a chart from Application?