请任何人都可以帮助我,我被困住了,我必须从JIRA网页中提取数据并将其放入EXCEL,而不使用插件,这样我试图用VBA进行操作但是我没有'如何进行。我尝试了几种方法,但它对我起作用了,有没有人已经这样做了?
谢谢
答案 0 :(得分:0)
这是假设您需要收集过滤数据
(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文件中。
你需要知道的事情 -
答案 1 :(得分:0)
谢谢,这是我的代码:
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