Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Read Content From A Website

hi all,
i want to read the dynamic content of a website..
i.e.,
Open http://www.thebulliondesk.com/
in that website at the very top there is a table kind of thing showing
Prices for Gold Price and Silver Price.
i want to read the prices of gold and silver (dynamic prices)from that
website and use them in my application.
is it any way possible to do so, and if so can u plz guide me how to do it..

thanks for the help in advance.

i tried saving the page's content in a .txt fromat but those dynamic values
were not there in the .txt file.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Read Content From A Website

Hi Pramod,

Open http://www.thebulliondesk.com/
in that website at the very top there is a table kind of thing showing
Prices for Gold Price and Silver Price.
i want to read the prices of gold and silver (dynamic prices)from that
website and use them in my application.
is it any way possible to do so, and if so can u plz guide me how to do it..


Data, get external data, new web query is the way to go I guess.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Read Content From A Website

hi Jan,
i tried doing it.. it showed an error saying that :"the query does not
return any value"
i tried exporting the whole page into excel and as u can see in the web page
there are colums showinf bid-ask-(+/-)-LDN, but the cells do not show the
values or the bid and ask column, as i think they r dynamic values.
so is there any other possibility to read the data.

thanks 4 the reply JAN


"Jan Karel Pieterse" wrote:

Hi Pramod,

Open http://www.thebulliondesk.com/
in that website at the very top there is a table kind of thing showing
Prices for Gold Price and Silver Price.
i want to read the prices of gold and silver (dynamic prices)from that
website and use them in my application.
is it any way possible to do so, and if so can u plz guide me how to do it..


Data, get external data, new web query is the way to go I guess.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Read Content From A Website

Pramod,

The code below worked for me:

Regards,
David Miller


Function GetPrices()
Dim ie As Object, _
l, J As Long, _
r As Range

Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "http://www.thebulliondesk.com/" & _
"RHS_CHARTS.aspx?Chart=Fix"
Do Until .readystate = 4
DoEvents
Loop
With .document.all
For l = 0 To .Length
If .Item(l).classname = "td" Then
Set r = Range("A65536").End(xlUp).Offset(1, 0)
Select Case .Item(l).innertext
Case "Gold"
For J = 0 To 5
r.Offset(0, J).Value = .Item(l +
J).innertext
Next J
Case "Silver"
For J = 0 To 5
r.Offset(0, J).Value = .Item(l +
J).innertext
Next J
GoTo PricesExit
End Select
End If
Next
End With
End With
PricesExit:
Set r = Nothing
Set ie = Nothing
End Function

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Read Content From A Website

HI Dave

the piece of code u provided i tried pating it in a module in a n excel
sheet and then in workbook_open i called that function, by which it opened
internet explorer and showed the webpage pointing in the code. but i want the
data in the excel sheet..

and am i going the right way in executing the following code provided by
you. else guide me throught the steps.

thanks
Pramod Mehta

"Dave Miller" wrote:

Pramod,

The code below worked for me:

Regards,
David Miller


Function GetPrices()
Dim ie As Object, _
l, J As Long, _
r As Range

Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "http://www.thebulliondesk.com/" & _
"RHS_CHARTS.aspx?Chart=Fix"
Do Until .readystate = 4
DoEvents
Loop
With .document.all
For l = 0 To .Length
If .Item(l).classname = "td" Then
Set r = Range("A65536").End(xlUp).Offset(1, 0)
Select Case .Item(l).innertext
Case "Gold"
For J = 0 To 5
r.Offset(0, J).Value = .Item(l +
J).innertext
Next J
Case "Silver"
For J = 0 To 5
r.Offset(0, J).Value = .Item(l +
J).innertext
Next J
GoTo PricesExit
End Select
End If
Next
End With
End With
PricesExit:
Set r = Nothing
Set ie = Nothing
End Function


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Content in one coulumn using given content in another Colin Hayes Excel Worksheet Functions 4 March 28th 10 11:28 PM
How to transpose formulas from column content to row content. Notrom Excel Worksheet Functions 1 October 12th 06 06:57 PM
How to read text content of AS400 screen abc[_6_] Excel Programming 2 December 28th 05 11:53 PM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM


All times are GMT +1. The time now is 10:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"