• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Web Sitesine Tarihi Excelden Girmek

Katılım
26 Ocak 2007
Mesajlar
4,625
Excel Vers. ve Dili
Ofis 2016
Merhaba Arkadaşlar,
Herhangi bir web sitesinin tarih girilecek bölüme tarihi Excel hücresinden gönderilmesi mümkün mü ?
Yoksa web sitesinden sitesine kodu değişir mi !
 
teşekkürler üstad. Web sitesindeki CONVERT butonunu tıklatmak mümkün müdür !
Şöyle bir kod var, bunda hangi terimi koda yazmalı acaba !


</div>





<button id='ict_go_btn_svg' class='uccGoButton' type='submit' value='Convert' tabindex='5' onclick='return svgSubmit("ictForm", "validateUCCInputs")' title="Convert"><span class='uccGoBtnText'>Convert</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" id="uccGoBtnImg" enable-background="new 0 0 60 60"><path class="st0-cnvrtr" d="M.4 35.1h40.4l-13.8 13.7 7.3 7.1 25.3-26.2-25.3-26.1-7.1 7.1 13.5 13.8h-40.3v10.6z" id="Icon_1_"/>



</svg></button>



</form>



<div class="datepickerDropBg" style="display:none;"></div>



<script>
 
wb.Document.getElementById("ict_go_btn_svg").Click

wb yerine kendi objectinizin adını yazarsınız.

websitesi adresini paylaşırsanız yukarıdaki kod çalışmazsa başka çözüm yoluna bakabiliriz.
 
wb.Document.getElementById("ict_go_btn_svg").Click

wb yerine kendi objectinizin adını yazarsınız.

websitesi adresini paylaşırsanız yukarıdaki kod çalışmazsa başka çözüm yoluna bakabiliriz.
Üstad çok teşekkür ederim. Şu siteden bazı tarihler için kur çekmek istiyoruz.
Tarihi Excel girip, o günü tarihlerini Excele indirmek yeterli.
 
Buton tıklatmaya gerek yok. Aşağıdaki gibi kod ile veri çekebilirsiniz. Tarihi A1 hücresine girip deneyin.
Kod:
Sub Aktar()
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;https://www.xe.com/currencytables/?from=GBP&date=" & Format(Range("A1").Value, "yyyy-mm-dd"), Destination _
        :=Range("$A$5"))
        .Name = "?from=GBP&date=" & Format(Range("A1").Value, "yyyy-mm-dd") & "_1"
        .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 = """historicalRateTbl"""
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
End Sub
 
Buton tıklatmaya gerek yok. Aşağıdaki gibi kod ile veri çekebilirsiniz. Tarihi A1 hücresine girip deneyin.
Kod:
Sub Aktar()
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;https://www.xe.com/currencytables/?from=GBP&date=" & Format(Range("A1").Value, "yyyy-mm-dd"), Destination _
        :=Range("$A$5"))
        .Name = "?from=GBP&date=" & Format(Range("A1").Value, "yyyy-mm-dd") & "_1"
        .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 = """historicalRateTbl"""
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
End Sub
üstad mükemmelsiniz, çok çok teşekkür ediyorum. Sağlıcakla kalın.
 
Geri
Üst