Web ten altın fiyatlarını almak.

Katılım
31 Aralık 2014
Mesajlar
1,845
Excel Vers. ve Dili
Excel 2010
Merhaba Evren hocam, aşağıdaki gibi işinize yararmı?

Kod:
Sub Alt()
Set a = CreateObject("htmlFile")
Set x = CreateObject("MSXML2.XMLHTTP")
x.Open "Get", "http://bigpara.hurriyet.com.tr/altin", "False"
x.send
'Application.Wait (Now + TimeValue("0:00:02"))
a.body.innerHTML = x.responseText
On Error Resume Next
Set c = a.getElementById("content")
For Each j In c.getElementsByTagName("*")
If j.classname = "tBody" Then
For Each k In j.getElementsByTagName("ul")
s = s + 1
Cells(s, 1) = k.Children(0).innertext
Cells(s, 2) = k.Children(1).innertext
Cells(s, 3) = k.Children(2).innertext
Next
Exit For
End If
Next
End Sub
 
Katılım
5 Kasım 2006
Mesajlar
571
Excel Vers. ve Dili
TÜRKCE Excel 2021 32bit
Merhaba Evren hocam, aşağıdaki gibi işinize yararmı?

Kod:
Sub Alt()
Set a = CreateObject("htmlFile")
Set x = CreateObject("MSXML2.XMLHTTP")
x.Open "Get", "http://bigpara.hurriyet.com.tr/altin", "False"
x.send
'Application.Wait (Now + TimeValue("0:00:02"))
a.body.innerHTML = x.responseText
On Error Resume Next
Set c = a.getElementById("content")
For Each j In c.getElementsByTagName("*")
If j.classname = "tBody" Then
For Each k In j.getElementsByTagName("ul")
s = s + 1
Cells(s, 1) = k.Children(0).innertext
Cells(s, 2) = k.Children(1).innertext
Cells(s, 3) = k.Children(2).innertext
Next
Exit For
End If
Next
End Sub
Merhaba.Alttaki kod satırıyla ilgili detaylı türkçe kaynak varmıdır yada siz açıklayabilirmisiniz?
Son zamanlarda çok denk geldiği için ilgimi çekti.Sağolun.
CreateObject("MSXML2.XMLHTTP")
 

Orion1

Uzman
Uzman
Katılım
1 Mart 2005
Mesajlar
22,254
Excel Vers. ve Dili
Win7 Home Basic TR 64 Bit

Ofis-2010-TR 32 Bit
Sayın PLINT;
Teşekkür ederim.
İyi geceler.
 
Üst