- ©«¤l
- 112
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 136
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- excel
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-3-12
- ³Ì«áµn¿ý
- 2022-11-29

|
[µo°Ý] ½Ð°Ý¦p¦ó±qºô¸ô¤W§ì¤U¸ê®Æ¦s¤Jexcel«á"¦C"¤£·|°Ê
°²³]¥H¤U²Ä¤@µ§¦s¤JA80¡A²Ä¤Gµ§¦s¤JA100¡A¦ý²Ä¤@µ§ªº¸ê®Æ·|³Q±À¨ìM80¡A½Ð°Ýn¦p¦ó×§ï¡C
ÁÂÁÂ!
Sub ·s¼W¬d¸ß()
Range("A80").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://tw.stock.yahoo.com/q/q?s=1101", Destination:=Selection)
.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 = "3"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
.Name = .ResultRange.Cells(1, 1)
End With
Range("A100").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://tw.stock.yahoo.com/q/q?s=1101", Destination:=Selection)
.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
.Name = .ResultRange.Cells(3, 1)
End With |
|