ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¦p¦ó¥HVBAÂ^¨úºô¯¸¤Wªº¸ê®Æ¡H

[µo°Ý] ½Ð°Ý¦p¦ó¥HVBAÂ^¨úºô¯¸¤Wªº¸ê®Æ¡H

¥»©«³Ì«á¥Ñ mnsmrtl ©ó 2011-4-23 12:11 ½s¿è

¦pÃD¡A§Ú§Æ±æ¦bEXCEL¿é¤JªÑ²¼¥N½X¡AµM«á¥i¥H±qÃÒ¥æ©Ò©Î¬O©_¼¯µ¥ºô¯¸§ì¨ú·í¤é¦¬½Lµ¥¼Æ¾Ú
¤£¹L§¹¥þ¤£ª¾¹D±q¦ó¤U¤â¡A½Ð¦U¦ì¥ý¶i¤£§[«ü±Ð¡AÁÂÁÂ
¤£¶i«h°h

¦^´_  Scott090

­ì©lºô¯¸: https://finance.yahoo.com/quote/AAPL/history?period1=1473638400&period2 ...
ui123 µoªí©ó 2017-9-14 16:27


½Ð°Ñ¦Ò¡G
    http://forum.twbts.com/thread-20288-1-1.html

TOP

¥»©«³Ì«á¥Ñ Scott090 ©ó 2017-11-11 19:53 ½s¿è

¦^´_ 23# ui123


   
­ì©lºô¯¸: https://finance.yahoo.com/quote/AAPL/history?period1=1473638400&period2 ...
ui123 µoªí©ó 2017-9-14 16:27



period1=1473638400, period2=1505174400 ªº¼Æ¦r¬O ¤é´Áªº¬í¼Æ¼Æ¦C­È
¥HVBA­pºâ¥i±o
¨Ò¦p ¤é´Á¬O "2017/1/20"¡A«h period = datevalue("2017/1/20") * 86400 - 2209190400
¨ä¤¤ ¤@¤é ¦³86400  ¬í, 22091904005³o­Ó¼Æ¦r¬O³o­Óºô­¶¹ï¤é´Áºtºâªº¤@­Ó±`¼Æ

¥i¥HÅçºâ¡G
a = (1473638400 + 2209190400) / 86400 = 42625.33333
yyyy = year(a) = 2016
mm  = month(a) = 9
dd = day(a) = 12

©Ò¥H¡A 1473638400 ³o­Ó¼Æ¦r ¥Nªí ¤é´Á 2016/9/12

¥H¤W½Ð°Ñ¦Ò

TOP

¦^´_ 22# Scott090

­ì©lºô¯¸: https://finance.yahoo.com/quote/AAPL/history?period1=1473638400&period2=1505174400&interval=1d&filter=history&frequency=1d
·|¦Û°Ê·|Âন¡A³W«h¤£²M·¡¡A¥Ø«e¥ÎVBA§ì¥u¯à§ì¨ì100µ§

TOP

¦^´_ 21# ui123

½Ð°Ý³o­Ó¼Æ­È¤å¦r¦p¦óÂà´«¦¨¤é´Á®æ¦¡?  ÁÂÁÂ
    period1=1473638400

TOP

¦^´_ 11# oobird


¨Ó°Ý¤@¤U oobird ¤j¤j¡A
oobird¤j¤j °Ý§A³á¡A§Ú¥Î¤U­±³o­Óµ{¦¡§ì¥Xªº100µ§¸ê®Æ¡A§Aª¾¹D«ç¼ËÅý¥L§ì§¹¾ã¶Ü¡H

­ì©lºô¯¸: https://finance.yahoo.com/quote/AAPL/history?period1=1473638400&period2=1505174400&interval=1d&filter=history&frequency=1d

Sub QueryTable()
    Const xlURL As String = "https://finance.yahoo.com/quote/AAPL/history?period1=1473638400&period2=1505174400&interval=1d&filter=history&frequency=1d"
    With ActiveSheet.QueryTables.Add("URL;" & xlURL, Destination:=Range("$A$1"))
        .WebFormatting = xlWebFormattingNone
        .TablesOnlyFromHTML = False
        .RefreshStyle = xlOverwriteCells
        .SaveData = True
        .Refresh 0
    End With
End Sub

TOP

¦^´_ 5# GBKEE

GBKEE¤j¤j¡A§Ú­ì¥»·Q¥Î³o´X¤Ñ°Ý§Aªº¡A§ìCrumb¦ì¸m¨Ó¤U¸ücsvÀɮסA¦ý¨S¦³¦¨¥\¡A©Ò¥H·Q´«¤U­±¨º­Óºô§}¸Õ¸Õ¡A¦ý§ì¥Xªº¸ê®Æ¤£§¹¾ã¡A¦pªG¥i¥H§ì¨ú§¹¾ã´N¤Ó¦n¤F
https://finance.yahoo.com/quote/AAPL/history?period1=1473638400&period2=1505174400&interval=1d&filter=history&frequency=1d
¬õ®Ø¤U­±¬O­n§ìªº¸ê®Æ:

javascript:;

Data 1.PNG (52.44 KB)

Data 1.PNG

TOP

¦^´_ 5# GBKEE

¤j¤j½Ð°Ý¤@¤U¡A§Ú¥Î¤U­±³o­Óµ{¦¡§ì¥Xªº¸ê®Æ¸ò­ì©lºô¯¸ªº¸ê®Æ¤ñ¸û¤U¡A¤U­±¦³¤@¬q¨S¦³§ì¤£¨ì¡A¬O¤£¬O¦³°Ñ¼Æ¨S³]¦n? ­nwait¶Ü?¦]¬°¤U­±¦³Åã¥ÜLoading more data...¦ý¬O§Ú¤£ª¾¹D«ç¼ËÅý¥L¶]§¹

­ì©lºô¯¸: https://finance.yahoo.com/quote/AAPL/history?period1=1473638400&period2=1505174400&interval=1d&filter=history&frequency=1d

Sub QueryTable()
    Const xlURL As String = "https://finance.yahoo.com/quote/AAPL/history?period1=1473638400&period2=1505174400&interval=1d&filter=history&frequency=1d"
    With ActiveSheet.QueryTables.Add("URL;" & xlURL, Destination:=Range("$A$1"))
        .WebFormatting = xlWebFormattingNone
        .TablesOnlyFromHTML = False
        .RefreshStyle = xlOverwriteCells
        .SaveData = True
        .Refresh 0
    End With
End Sub

TOP

½Ð°Ý ¦pªG¥u·Q§ì ºô¯¸¤Wªº³¡¤À¸ê®Æ ¤U¨Ó¡A VBA ­n¦p¦ó¼g ?
  1. Sub ´Á³f¥æ©ö¤f¼Æ()
  2. Set shFirstQtr = ActiveSheet
  3. Set qtQtrResults = shFirstQtr.QueryTables _
  4.     .Add(Connection:="URL;http://www.taifex.com.tw/chinese/3/7_12_3_tbl.asp", _
  5.         Destination:=shFirstQtr.Cells(3, 1))
  6. With qtQtrResults
  7.     .WebFormatting = xlNone
  8.     .WebSelectionType = xlSpecifiedTables
  9.     .WebTables = "2"
  10.     .Refresh
  11. End With
  12. End Sub
½Æ»s¥N½X

§ì´Á³f¤f¼Æ.jpg (124 KB)

´Á³f¥æ©ö¤f¼Æ

§ì´Á³f¤f¼Æ.jpg

TOP

¤w§ä¨ì.Refreshstyleªº¦ì¸m
¦ý§ä¤£¨ì«ç¼Ë¥u¾É¤J²Ä¤@Ä檺¸ê®Æ¢I¢I
VBA·s¤â

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD