-
-
Save suatatan/e377de41ce7f6ea94ba3 to your computer and use it in GitHub Desktop.
Send data over excel VBA (macro)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Macro1() | |
Dim result As String | |
Dim myURL As String, postData As String | |
Dim winHttpReq As Object | |
Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1") | |
myURL = "http://localhost:8082/ws" | |
postData = "q=suat" | |
winHttpReq.Open "POST", myURL, False | |
winHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded" | |
winHttpReq.Send (postData) | |
result = winHttpReq.responseText | |
MsgBox (result) | |
ActiveWorkbook.Save | |
ActiveWorkbook.Save | |
ActiveWorkbook.Save | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment