Hello,
I am trying to automate CSV exports from multiple Jira DataBases (all Servers; version 7.13.1 , 7.12.1 and 7.6.7.).
At first, it only worked for the server on the same network as the computer launching the VBA macro requesting those CSV exports (7.13.1).
The other csv exports were containing HTML code instead of the expected CSV formated data.
Then we found that adding a ? at the end of the URL fixed it but only for one of the DB (7.12.1).
The third DB is still giving us a CSV file containing HTML code (7.6.7).
This is the code we run with VBA to get the files
Dim WinHttpReq As Object
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
WinHttpReq.Open "GET", myURL, False, myUsername, myPassword
WinHttpReq.send
myURL = WinHttpReq.responseBody
If WinHttpReq.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write WinHttpReq.responseBody
oStream.SaveToFile filename, 2 ' 1 = no overwrite, 2 = overwrite
oStream.Close
End If
and here is the URL we use
https://***/sr/jira.issueviews:searchrequest-csv-all-fields/60403/test.csv
any idea why we are getting HTML code instead of the usual CSV formated data?
Edit: We found that it does not have the same behavior on different PC.
After transferring the HTML code into a txt file, renaming it ".HTML" and opening it in a browser showed us that it was a "Please login to see this content" page.
Internet explorer remembering my user on some database was causing this issue.
In the code above, I don't believe that the username password are actually logging a user at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.