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

[µo°Ý] ½Ð°Ý¦p¦ó±qºô¸ô¤W§ì¤U¸ê®Æ¦s¤Jexcel«á"¦C"¤£·|°Ê

[µ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

¦^´_ 1# cji3cj6xu6
With ActiveSheet.QueryTables.Add->  ·s¼W¬d¸ß,¦pRange("A80")¦³[¬d¸ß],·|³Q¤@ª½©¹¤u§@ªíªº¥kÃä²¾°Ê(¤£·|³QÂл\)

With ActiveSheet.QueryTables(??) -> ²Ä??­Ó¥~³¡¬d¸ß ,´N¤£·|°Ê¨ì¨ä¥¦ªº¥~³¡¬d¸ß.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¤S³Â·Ð±z¤FGBKEE¤j¡A
­ì¨Ó¬O­×§ï¦¹³B¡AÁÂÁÂG¤j¡C

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD