誰かが正しい方向に私を導くことができますか?私が後にしているのは、ユーザーが開くワークブックなどを追跡するExcel-VBAアドインです。既に完了している間に、情報をデータベースに取得したいと考えています。HTTPリクエスト(Python + VBA)
私はその情報を格納するために使用される非常に単純なPythonサーバーを実行していると思います。したがって、質問は、VBAが格納される単純な文字列を投稿できるように、単純なhttpサーバーを設定するにはどうすればよいですか?
ありがとうございます!
編集:
ありがとうございましたchf!私は先に進み、あなたの助言に従った - 私はそれについてのいくつかの短い経験があったとして私はジャンゴとフラスコを交換した。私は最初のAPIを今作成しましたが、投稿したVBAコードを使用して投稿することはできません。私はそうのようなhttpieを行うことができます: "HTTPのPOSTのhttpを:/127.0.0.1名=" somenameの」workbookname = "someworkbook" を
Sub TestFramework()
Dim newClient As New WebClient
Dim newRequest As New WebRequest
Dim Response As WebResponse
newClient.BaseUrl = "http://127.0.0.1:8000/api/create/"
newRequest.Method = HttpPost
newRequest.Format = WebFormat.plaintext
newRequest.AddBodyParameter "name", "somename"
newRequest.AddBodyParameter "workbook_name", "Sheet1"
Set Response = newClient.Execute(newRequest)
End Sub
あなたは正しい道に私を指している可能性があります任意のチャンスを
。?RuntimeError: You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8000/api/create/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings. [03/Aug/2016 20:13:18] "POST /api/create HTTP/1.1" 500 60534
EDIT2:ネヴァーマインド、それは:)