請任何人都可以幫助我,我卡住了,我必須從JIRA網頁提取數據,並將其放入EXCEL中,而不使用插件,這是我試圖用VBA做到這一點,但我不如何繼續。我已經嘗試了幾種方法,但它不適合我,有沒有人已經這樣做了?從JIRA帳戶獲取信息與認證
謝謝
請任何人都可以幫助我,我卡住了,我必須從JIRA網頁提取數據,並將其放入EXCEL中,而不使用插件,這是我試圖用VBA做到這一點,但我不如何繼續。我已經嘗試了幾種方法,但它不適合我,有沒有人已經這樣做了?從JIRA帳戶獲取信息與認證
謝謝
這是你需要收集過濾數據
(New-Object System.Net.WebClient).DownloadFile("http://linktoyourjira/sr/jira.issueviews:searchrequest-excel-current-fields/yourFilterID/SearchRequest-yourFilterID.xls?tempMax=5000&os_username=yourlogin&os_password=yourpassword","C:\Users\dzcoats\Desktop\Process A $(get-date -f MM-dd-yyyy).xls")
雖然這是一個PowerShell腳本的假設下,將傾倒在您的過濾結果到Excel文件。
事情你需要知道 -
請登錄名和密碼我不需要把引號「」? os_username = yourlogin&os_password = yourpassword, – Lilian
@Llian否字符串已經在引號:) –
謝謝你,這裏是我的代碼:
Private JiraService As New MSXML2.XMLHTTP60
Private JiraAuth As New MSXML2.XMLHTTP60
Sub JIRA()
With JiraAuth
.Open "POST", "https://jiralink/rest/auth/1/session", False
.setRequestHeader "Content-Type", "application/json"
.setRequestHeader "Accept", "application/json"
.send " {""username"" : """username""", ""password"" : """password"""}"""
MsgBox .Status
If .Status = "200" Then
sCookie = "JSESSIONID=" & Mid(sErg, 42, 32) & "; Path=/" & sPfad
Login = True
End If
End With
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://jiralink/sr/jira.issueviews:searchrequest-excel-all-fields/temp/SearchRequest.html?jqlQuery=project+%3D+NAME+AND+Sprint+%3D+1+ORDER+BY+priority+DESC%2C+updated+DESC&tempMax=1000" _
, Destination:=Range("$A$1"))
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
我想信息導出到Excel中,要得到這樣的結果: result
這是從一個過濾器? –
怎麼樣複製粘貼,你可以模仿你所做的錄製一個麥克羅VBA –