Vba 如何使用API嵌入将Docusign信封数据查询到Excel中?
我一直在试图找到一种通过vba使用docusign的API嵌入将数据拉入excel的方法。对于quickbase等其他网站API,这是一个非常简单的过程,我使用vba调用internet explorer,然后从xml响应中提取所需的所有内容,或者能够设置web查询。然而,我一直无法找到一种方法来避免使用更高级的http请求或其他语言类型来完成此任务 这是我用来查询quickbase的代码,我希望它也能用于docusignVba 如何使用API嵌入将Docusign信封数据查询到Excel中?,vba,excel,docusignapi,Vba,Excel,Docusignapi,我一直在试图找到一种通过vba使用docusign的API嵌入将数据拉入excel的方法。对于quickbase等其他网站API,这是一个非常简单的过程,我使用vba调用internet explorer,然后从xml响应中提取所需的所有内容,或者能够设置web查询。然而,我一直无法找到一种方法来避免使用更高级的http请求或其他语言类型来完成此任务 这是我用来查询quickbase的代码,我希望它也能用于docusign Sub qbImport() Dim qbUser A
Sub qbImport()
Dim qbUser As String
Dim qbPassword As String
qbUserDefault = "Enter User Name Here"
qbPasswordDefault = "Enter Password Here"
qbUserMessage = "What is your Quickbase Log-In?" & Chr(13) & Chr(13) & "**It is an email address"
qbPasswordMessage = "What is your Quickbase Log-In Password?"
qbUser = InputBox(qbUserMessage, "Quickbase Log-In Email", qbUserDefault)
qbPassword = InputBox(qbPasswordMessage, "Quickbase Log-In Password", qbPasswordDefault)
Application.ScreenUpdating = False
Dim IE As New InternetExplorer
IE.Visible = False
IE.navigate "https:// [quickbase url] /db/main?a=API_Authenticate&username=" & qbUser & "&password=" & qbPassword
Do While IE.Busy
Loop
Dim ticket As String
Dim passwordError As String
passwordError = IE.document.getElementsByTagName("errtext")(0).innerText
If passwordError = "<errtext>Unknown username/password</errtext>" Then
wrongPassword = MsgBox("The log-in information entered is incorrect. Please re-update the report and enter the correct password", vbOKOnly, "Log-In Error")
IE.Quit
End
Else: End If
ticket = Mid(IE.document.getElementsByTagName("ticket")(0).innerText, 9, Len(IE.document.getElementsByTagName("ticket")(0).innerText) - 17)
IE.Quit
Sheets("data").Select
Cells.Select
Selection.QueryTable.Delete
Selection.ClearContents
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;https:// [quickbase url] /db/bg6ihpgr5?act=API_GenResultsTable&ticket=" & ticket & "&apptoken= [app token]
&qid=205&options=csv", _
Destination:=Range("$A$1"))
.Name = "qbData"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
您可以发布您尝试过的内容吗?我编辑了原始帖子,以包含我用于查询quickbase的语言,我希望它也能够与docusign一起使用。基本上,我希望能够通过URL使用docusign API。