Hello again -
I am using Excel 2003 to create an XML (text) file which I would like to be
able to upload via the internet. Anyone have any thought about how to do
this upload?
Thanks in advance,
Chris (ct60)
Hello again -
I am using Excel 2003 to create an XML (text) file which I would like to be
able to upload via the internet. Anyone have any thought about how to do
this upload?
Thanks in advance,
Chris (ct60)
Upload to where? Do you have FTP access to the destination?
--
Tim Williams
Palo Alto, CA
"ct60" <ct60@discussions.microsoft.com> wrote in message news:E6975B9E-70B8-4FE3-BC9C-DA243B299597@microsoft.com...
> Hello again -
>
> I am using Excel 2003 to create an XML (text) file which I would like to be
> able to upload via the internet. Anyone have any thought about how to do
> this upload?
>
> Thanks in advance,
>
> Chris (ct60)
Yes, good question.
Actually, I was looking to use an HTTP Post request to an https site.
According to the documenation, that is acceptable, but I do not know how to
do this in Excel.
Any thoughts?
Thanks,
Chris
"Tim Williams" wrote:
> Upload to where? Do you have FTP access to the destination?
>
> --
> Tim Williams
> Palo Alto, CA
>
>
> "ct60" <ct60@discussions.microsoft.com> wrote in message news:E6975B9E-70B8-4FE3-BC9C-DA243B299597@microsoft.com...
> > Hello again -
> >
> > I am using Excel 2003 to create an XML (text) file which I would like to be
> > able to upload via the internet. Anyone have any thought about how to do
> > this upload?
> >
> > Thanks in advance,
> >
> > Chris (ct60)
>
>
>
I've used this in Excel:
'******************************************
Const ERR_STATUS As String = "Error: "
Private m_ResponseText As String
Private m_ErrorStatus As String
Private m_OK As Boolean
Sub DoPost(ByVal sURL As String, sContent As String)
Dim objXML As Object
Dim sResponse As String
Dim newURL As String
m_ResponseText = ""
m_ErrorStatus = ""
m_OK = False
newURL = NoCacheUrl(sURL)
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.Open "POST", newURL, False
objXML.send (sContent)
If objXML.readyState = 4 And objXML.Status = 200 Then
m_ResponseText = objXML.ResponseText
If m_ResponseText Like ERR_STATUS & "*" Then
m_ErrorStatus = m_ResponseText
m_ResponseText = ""
m_OK = False
Else
m_OK = True
End If
Else
m_ErrorStatus = objXML.statusText
m_OK = False
End If
End Sub
Function NoCacheUrl(ByVal sURL As String) As String
Dim sCacheBuster As String
'Make sure not to use a previously-cached response
' Unique URL ensures new request...
sCacheBuster = Format(Now(), "mmddhhmmss")
If InStr(sURL, "?") > 0 Then
'already a querystring, so add a parameter
sURL = sURL & "&nocache=" & sCacheBuster
Else
'no querystring: add one
sURL = sURL & "?nocache=" & sCacheBuster
End If
NoCacheUrl = sURL
End Function
'**************************************
--
Tim Williams
Palo Alto, CA
"ct60" <ct60@discussions.microsoft.com> wrote in message news:3DAADF44-A3E2-4CE2-B7DA-278ACD80854A@microsoft.com...
> Yes, good question.
>
> Actually, I was looking to use an HTTP Post request to an https site.
> According to the documenation, that is acceptable, but I do not know how to
> do this in Excel.
>
> Any thoughts?
>
> Thanks,
>
> Chris
>
>
>
> "Tim Williams" wrote:
>
> > Upload to where? Do you have FTP access to the destination?
> >
> > --
> > Tim Williams
> > Palo Alto, CA
> >
> >
> > "ct60" <ct60@discussions.microsoft.com> wrote in message news:E6975B9E-70B8-4FE3-BC9C-DA243B299597@microsoft.com...
> > > Hello again -
> > >
> > > I am using Excel 2003 to create an XML (text) file which I would like to be
> > > able to upload via the internet. Anyone have any thought about how to do
> > > this upload?
> > >
> > > Thanks in advance,
> > >
> > > Chris (ct60)
> >
> >
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks