DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub TabloAl()
Dim HTMLDoc As New HTMLDocument
Dim objTable As Object
Dim lRow As Long
Dim lngTable As Long
Dim lngRow As Long
Dim lngCol As Long
Dim ActRw As Long
Dim objIE As InternetExplorer
Set objIE = New InternetExplorer
objIE.navigate "http://www.altinpiyasa.com/"
Do Until objIE.readyState = 4 And Not objIE.Busy
DoEvents
Loop
ActiveSheet.UsedRange.ClearContents
Application.Wait (Now + TimeValue("0:00:03"))
HTMLDoc.body.innerHTML = objIE.document.body.innerHTML
With HTMLDoc.body
Set objTable = .getElementsByTagName("table")
For lngTable = 0 To objTable.Length - 1
For lngRow = 0 To objTable(lngTable).Rows.Length - 1
For lngCol = 0 To objTable(lngTable).Rows(lngRow).Cells.Length - 1
ActiveSheet.Cells(ActRw + lngRow + 1, lngCol + 1) = objTable(lngTable).Rows(lngRow).Cells(lngCol).innerText
Next lngCol
Next lngRow
ActRw = ActRw + objTable(lngTable).Rows.Length + 1
Next lngTable
End With
objIE.Quit
On Error Resume Next
ActiveSheet.UsedRange.Select
For Each cell In Selection
cell.Value = cell.Value * 1
Next cell
End Sub
Sub getAltin()
' Haluk - 12/10/2021
' sa4truss@gmail.com
' https://excelhaluk.blogspot.com/
Dim objHTTP As Object, strURL As String
Dim HTML As Object, Tables As Object, Table As Object
Dim i As Long, iRow As Long, j As Integer
Range("B2:F" & Rows.Count) = ""
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
strURL = "http://www.altinpiyasa.com/"
objHTTP.Open "GET", strURL, False
objHTTP.send
Set HTML = CreateObject("HTMLFILE")
HTML.body.innerHTML = objHTTP.responseText
Set Tables = HTML.getElementsByTagName("table")
Set MyTable = Tables(1)
iRow = 1
For i = 1 To MyTable.Rows.Length - 1
iRow = iRow + 1
For j = 1 To MyTable.Rows(i).Cells.Length - 1
If j < 4 Then
Cells(iRow, j + 1) = Val(MyTable.Rows(i).Cells(j).innerText)
Else
Cells(iRow, j + 1) = MyTable.Rows(i).Cells(j).innerText
End If
Next
Next
Range("B2:D16").NumberFormat = "#,###.00"
End Sub
Sub getAltin()
' Haluk - 12/10/2021
' sa4truss@gmail.com
' https://excelhaluk.blogspot.com/
Dim objHTTP As Object, strURL As String
Dim HTML As Object, Tables As Object, Table As Object
Dim x As Integer, i As Long, iRow As Long, j As Integer
Range("B2:F16, B20:F22") = ""
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
strURL = "http://www.altinpiyasa.com/"
objHTTP.Open "GET", strURL, False
objHTTP.send
Set HTML = CreateObject("HTMLFILE")
HTML.body.innerHTML = objHTTP.responseText
Set Tables = HTML.getElementsByTagName("table")
For x = 1 To 2
Set MyTable = Tables(x)
iRow = IIf(x = 1, 1, 19)
For i = 1 To MyTable.Rows.Length - 1
iRow = iRow + 1
For j = 1 To MyTable.Rows(i).Cells.Length - 1
If j < 4 Then
Cells(iRow, j + 1) = Val(MyTable.Rows(i).Cells(j).innerText)
Else
Cells(iRow, j + 1) = MyTable.Rows(i).Cells(j).innerText
End If
Next
Next
Range("B2:D22, B20:D22").NumberFormat = "#,###.00"
Next
End Sub
Sub getAltin()
' Haluk - 12/10/2021
' sa4truss@gmail.com
' https://excelhaluk.blogspot.com/
Dim objHTTP As Object, strURL As String
Dim HTML As Object, Tables As Object, Table As Object
Dim x As Integer, i As Long, iRow As Long, j As Integer
Range("B2:F16, B20:F22") = ""
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
strURL = "http://www.altinpiyasa.com/"
objHTTP.Open "GET", strURL, False
objHTTP.send
Set HTML = CreateObject("HTMLFILE")
HTML.body.innerHTML = objHTTP.responseText
Set Tables = HTML.getElementsByTagName("table")
For x = 1 To 2
Set MyTable = Tables(x)
iRow = IIf(x = 1, 1, 19)
For i = 1 To MyTable.Rows.Length - 1
iRow = iRow + 1
For j = 1 To MyTable.Rows(i).Cells.Length - 1
If j < 4 Then
Cells(iRow, j + 1) = Replace((MyTable.Rows(i).Cells(j).innerText), ".", "") + 0
Else
Cells(iRow, j + 1) = MyTable.Rows(i).Cells(j).innerText
End If
Next
Next
Next
Range("B2:F16").NumberFormat = "#.00"
Range("B20:F22").NumberFormat = "#,##0.0000"
Range("F2:F22").NumberFormat = "hh:mm;@"
Range("E2:E22").NumberFormat = "@"
End Sub
Haluk hocam elinize sağlık güzel çalışıyor Epeydir IEXPLORER Probleminden Kur Bilgisi çekemiyordum bununla çekebildim.36 No'lu mesajdaki kodu revize ettim....
.
Range("E2:E22").NumberFormat = "@"