- Katılım
- 11 Şubat 2016
- Mesajlar
- 199
- Excel Vers. ve Dili
- 2013
Enerji piyasası düzenleme kurumunun web sitesinden her gün akaryakıt fiyatlarını alıyorum.
Web sorgusu ile makro kaydederek bir kod oluşturdum fakat sorguda günü seçemiyorum.
Ayrıca çektiğim bilgilerin hangi tarihe ait olduğunuda yazdıramıyorum.
Nasıl yapabilirim örnek kod aşağıda yardımcı olursanız yönlendirirseniz memnu olurum.
Örnek Dosya ekliyorum.
Şimdiden teşekkürler
Sub Makro1()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://bildirim.epdk.org.tr/bildirim-portal/faces/pages/tarife/petrol/yonetim/bultenSorgula.xhtml" _
, Destination:=Range("$A$1"))
.Name = "bultenSorgula.xhtml"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "6"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
Web sorgusu ile makro kaydederek bir kod oluşturdum fakat sorguda günü seçemiyorum.
Ayrıca çektiğim bilgilerin hangi tarihe ait olduğunuda yazdıramıyorum.
Nasıl yapabilirim örnek kod aşağıda yardımcı olursanız yönlendirirseniz memnu olurum.
Örnek Dosya ekliyorum.
Şimdiden teşekkürler
Sub Makro1()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://bildirim.epdk.org.tr/bildirim-portal/faces/pages/tarife/petrol/yonetim/bultenSorgula.xhtml" _
, Destination:=Range("$A$1"))
.Name = "bultenSorgula.xhtml"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "6"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

