如何通过vba宏在jive上传excel文件?

时间:2014-01-04 10:49:58

标签: excel excel-vba jive vba

我必须通过vba宏在jive上传excel文档。请通过REST API或任何其他方法告诉我

1 个答案:

答案 0 :(得分:0)

这可以在VBA中的命令行模式下使用Jive应用程序。联系您的Jive人员以获取此信息。首先,您必须下载此应用程序并将其安装在您的系统中,然后您必须通过Shell命令使用参数调用此应用程序。

我使用以下代码来完成此任务。

Public Sub ShellCmd()

    Dim strExe As String, strJiveInstanceURL As String, strFilePattern As String
    Dim usrID As String, Passwd As String, strcurlExtra As String

    strExe = "The Jive exe file path"
    strJiveInstanceURL = "https://companyname.jiveon.com"
    strFilePattern = "c:/santosh/Test1.xlsx"
    usrID = "***" ' your user ID
    Passwd = "*******" ' your password
    strcurlExtra = "-x http://gateway.****.***:1234 --proxy-user your user       ID:Your password -k" ' proxy server settings

    Call Shell("""" & strExe & """" & " " & """" & strJiveInstanceURL & """" & " " & """" & _
strFilePattern & """" & " " & "test" & " " & """ """ & " " & """" & "99743" & """" & _
" " & "1 userID Password" & " " & """" & strcurlExtra & """", vbNormalNoFocus)

End Sub