- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
[µo°Ý] ¦p¦ó²¤¹Lºô¶ªº¿ù»~°T®§?
¤U¦C¼Ò²Õ¦]¬°ºô§}¿ù»~¡A·|²£¥Í¥Xºô¶ªº¿ù»~°T®§¡An¦p¦ó²¤¹Lºô¶ªº¿ù»~°T®§©O?- Function test()
- On Error Resume Next '§Y«K¿ù»~Ä~Äò¤]·|¥X²{¿ù»~°T®§
- ayear = 2016 '±q2016¶}©l
- stockid = "6244.tw"
- With ActiveSheet.QueryTables.Add(Connection:= _
- "TEXT;http://ichart.finance.yahoo.com/table.csv?s=" & stockid & "&a=00&b=4&c=" & ayear & "&d=" & Month(Date) & "&e=" & Day(Date) & "&f=" & Year(Date) & "&g=d&ignore=.csv" _
- , Destination:=Range("A1"))
- .Name = "stockprice"
- .FieldNames = True
- .RowNumbers = False
- .FillAdjacentFormulas = False
- .PreserveFormatting = True
- .RefreshOnFileOpen = False
- .RefreshStyle = xlOverwriteCells
- .SavePassword = False
- .SaveData = True
- .AdjustColumnWidth = True
- .RefreshPeriod = 0
- .TextFilePromptOnRefresh = False
- .TextFilePlatform = 950
- .TextFileStartRow = 2
- .TextFileParseType = xlDelimited
- .TextFileTextQualifier = xlTextQualifierDoubleQuote
- .TextFileConsecutiveDelimiter = False
- .TextFileTabDelimiter = True
- .TextFileSemicolonDelimiter = False
- .TextFileCommaDelimiter = True
- .TextFileSpaceDelimiter = False
- .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1)
- .TextFileTrailingMinusNumbers = True
- .Refresh BackgroundQuery:=False '³oÓ¦a¤è¥unºô§}¿ù»~´N·|¥X²{¿ù»~°T®§¡A¦p¦ó¿ù»~¤§«á²¤¹L¿ù»~°T®§?
- End With
- End Function
½Æ»s¥N½X |
|