Post Excel Data to a Web Server

W

Waindy

Hi

I'm trying to find out if it is possible to post the data from a
excel document back to a web server in the same way as a HTML for
operates.

I can process the request.form variables using ASP and populate
server side database, ideally I would like to be able to create a for
based excel file that can then be submitted via a button in the file t
the web server.

I hope this is the correct group for this question.

My thanks in advance.

Nic
 
J

Jake Marx

Hi Nick,

Yes, you can do this using the XMLHTTP object:

Dim xml As XMLHTTP40
Dim abytPostData() As Byte

abytPostData = StrConv("fname=jake&lname=marx", vbFromUnicode)

Set xml = New XMLHTTP40
With xml
.Open "POST", "http://www.longhead.com"
.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
.send abytPostData
End With

Set xml = Nothing

To use this, you need to set a reference to "Microsoft XML, v4.0" via Tools
| References.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top