ªð¦^¦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

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

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD