J
Jason Morse
I am trying to define a web query in VBA, but running into problems
passing POST variables.
The following procedure works in XL98 (i.e. successfully passes the POST
variable to the PHP script). But in XL2004, nothing is passed in POST.
Did something change with this functionality between versions?
Sub Post_WebQuery()
Dim stURL As String
stURL = "http://my.intranet.site/my_script.php"
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & stURL, Destination:=Range("A1"))
.PostText = "post_var1=value1"
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub
Any ideas? I could modify the PHP script to accept GET variables, but
I'd prefer to stick with POST.
Thanks,
Jason
passing POST variables.
The following procedure works in XL98 (i.e. successfully passes the POST
variable to the PHP script). But in XL2004, nothing is passed in POST.
Did something change with this functionality between versions?
Sub Post_WebQuery()
Dim stURL As String
stURL = "http://my.intranet.site/my_script.php"
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & stURL, Destination:=Range("A1"))
.PostText = "post_var1=value1"
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub
Any ideas? I could modify the PHP script to accept GET variables, but
I'd prefer to stick with POST.
Thanks,
Jason