Function x(sURL As String, filename As String)
sFilename = Application.ActiveWorkbook.Path & Application.PathSeparator & filename & ".xml"
Set WinHttpReq = CreateObject("MSXML2.XMLHTTP")
WinHttpReq.Open "POST", sURL, False
WinHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
WinHttpReq.Send "j_username=XXXX&j_password=XXXX&uidPasswordLogon=Log+On"
WinHttpReq.Open "GET", sURL, False
WinHttpReq.Send
If WinHttpReq.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write WinHttpReq.responseBody
oStream.SaveToFile sFilename, 2
oStream.Close
End If
End Function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |