Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88030

How to extract csv file or txt file from linux server into Excel sheet using Excel Macro [closed]

$
0
0

Below is my code where I am able to login into linux server using Macro successfully and execute the file from path C:\Users\nt186017\Desktop\space_details.sh. But output file is generated on linux server. How to fetch details from linux server to remote machine using Excel Macro.

Private Sub CommandButton_Click()
    Dim UserName 'assign user name
    Dim Passwrd 'assign password
    Dim TaskID As Long
    UserName = "nilesh_t"
    Passwrd = "nilesh_t"

    pc1 = """C:\Program Files\PuTTY\putty.exe"" -ssh "& _
           UserName & "@10.5.1.66 -pw "& Passwrd & " -m ""C:\Users\nt186017\Desktop\space_details.sh"""

    TaskID = Shell(pc1, 1)
End Sub

Viewing all articles
Browse latest Browse all 88030

Trending Articles