FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to get data for website pages..
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
How to get data for website pages.. [message #180232] Fri, 01 February 2013 11:57 Go to next message
Sonu Yadav is currently offline  Sonu Yadav
Messages: 1
Registered: February 2013
Karma: 0
Junior Member
Hello friends

I want to write program for get data from website pages..and it will be download in Excel format..How it is possible please help me..
Re: How to get data for website pages.. [message #180234 is a reply to message #180232] Fri, 01 February 2013 13:49 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 2/1/2013 6:57 AM, Sonu Yadav wrote:
> Hello friends
>
> I want to write program for get data from website pages..and it will be download in Excel format..How it is possible please help me..
>

Depending on the web page, it's possible. What have you tried?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: How to get data for website pages.. [message #180280 is a reply to message #180232] Sun, 03 February 2013 20:03 Go to previous message
cate is currently offline  cate
Messages: 12
Registered: January 2012
Karma: 0
Junior Member
On Feb 1, 5:57 am, Sonu Yadav <sonnu.ya...@gmail.com> wrote:
> Hello friends
>
> I want to write program for get data from website pages..and it will be download in Excel format..How it is possible please help me..

This could be a vba question...


An example:


On Error Resume Next
Dim oHTTP As XMLHTTP: Set oHTTP = CreateObject("Microsoft.XMLHTTP")
If Err = ERR_APP_NOTFOUND Then
MsgBox "Failed CreateObject(""Microsoft.XMLHTTP"")"
GoTo LABEL_GETHTML_EXIT
End If

On Error GoTo 0

'Set getHTML = New DOMDocument60 '
http://msdn.microsoft.com/en-us/library/ms763742%28v=vs.85%29.aspx
'Dim oHTTP As XMLHTTP: Set oHTTP = New XMLHTTP

On Error GoTo label_http_error

Dim randomTime As Variant: randomTime = Now()

url = url & "?killcache=" & """" & randomTime & """" 'kill the
cache
If roach = True Or view_link_data = True Then
MsgBox url, , "Link Update Data"
End If

oHTTP.Open "GET", url, False
oHTTP.Send

On Error GoTo 0

Const HTTP_STATUS_COMPLETED As Integer = 200
If oHTTP.status <> HTTP_STATUS_COMPLETED Then
MsgBox "XMLHTTP failed. Status " & oHTTP.status
GoTo LABEL_GETHTML_EXIT
End If

If roach = True Or view_link_data = True Then
MsgBox oHTTP.responsetext, , "Link Update Data"
End If

'Set getHTML = CreateObject("DOMDocument60") ' why not?
Set getHTML = New DOMDocument60
If Err = ERR_APP_NOTFOUND Then
MsgBox "Failed: CreateObject(""DOMDocument60""). Include a
reference to ""Microsoft XML, V6.0"""
GoTo LABEL_GETHTML_EXIT
End If

getHTML.LoadXML (oHTTP.responsetext)
If getHTML.parseError.ErrorCode <> 0 Then
MsgBox "Failed oDoc.LoadXML"
Set getHTML = Nothing
GoTo LABEL_GETHTML_EXIT
End If
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cURL
Next Topic: about php connection string
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 00:03:21 GMT 2024

Total time taken to generate the page: 0.02905 seconds