Results 1 to 3 of 3
  1. #1
    Bertrand82 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2012
    Posts
    48

    Get file from sftp (winscp) with vba

    Hello everybody!

    Is it possible to get at file (e.g. txt-file) from a sftp server and import to a new table in an ms access db?

    As a suggestion with vba or other metod.



    Br Bertrand

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    I successfully use:

    Code:
    Function ExecuteWebRequest(ByVal url As String) As String
    Dim oXHTTP As Object
    If InStr(1, url, "?", 1) <> 0 Then
        url = url & "&cb=" & Timer() * 100
    Else
        url = url & "?cb=" & Timer() * 100
    End If
    Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
    oXHTTP.Open "GET", url, False
    oXHTTP.send
    ExecuteWebRequest = oXHTTP.responseText
    Set oXHTTP = Nothing
    End Function

  3. #3
    Bertrand82 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2012
    Posts
    48
    Thank you ranman!

    However realized this is a little to complicated for me.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 02-05-2014, 04:25 AM
  2. Replies: 13
    Last Post: 12-12-2013, 07:22 PM
  3. Import Excel file based on a date and time in file name
    By nhylan in forum Import/Export Data
    Replies: 4
    Last Post: 04-16-2013, 03:26 PM
  4. Replies: 2
    Last Post: 12-27-2012, 09:37 AM
  5. Replies: 10
    Last Post: 03-04-2012, 12:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums