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

¦p¦ó±Nºô¯¸¤ºªº¤é´Á°µ¦¨¦bexcel¥Î¦Û°Ê¿é¤J

¦p¦ó±Nºô¯¸¤ºªº¤é´Á°µ¦¨¦bexcel¥Î¦Û°Ê¿é¤J

¦U¦ì¥ý¶i,
¤p§Ì¦b¾Çvba ¨Ó±±¨îweb ¬d´` ¦ý¥X²{Äæ¦ì¦p¦ó´À¥N°ÝÃD,½Ð·|ªº¤HÀ°¦£
°ÝÃD¦p¤U:·Q±N³oºô§}"URL;http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/genpage/Report201108/A11220110818ALLBUT0999_1.php?" _
        , Destination:=Range("A1"))
ªºrepot«áªº 201108»P  A11220110818ALLBUT0999_1.php?" ªº20110818 °µ¦¨¥i¦bexcel ªí®æ¤ºª½±µ¿é¤J ¤£»Ý­n¥hºô¯¸Äæ§ï¤£ª¾¦³¦ó¤èªk
DREWCHEN1

Sub Test()
URL = "http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/genpage/Report" & [a1] & "/A112" & [a2] & "ALLBUT0999_1.php?"
Shell "explorer " & URL, 0
End Sub

a1Àx¦s®æ©ñ201108
a2Àx¦s®æ©ñ20110118

TOP

¦^´_ 2# oobird


    ÁÂÁ¤j¤j
^^
DREWCHEN1

TOP

¦^´_ 2# oobird
¤j¤jª©¥D,
¤p§Ì·Ó¤èªk§ï¤F«áÁÙ¬OµLªk­È¦æ,§Ú±N¾ã­Óµ{¦¡¶K¥X¨Ó¬Ý¬O­n«ç§ï¤~¹ï
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/genpage/Report201108/A11220110818ALLBUT0999_1.php?" _
        , Destination:=Range("A1"))
        .Name = "19"
        .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 = "10"
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
³Â·Ð§A¤F^^
DREWCHEN1

TOP

x = [a1]
y = [a2]
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.twse.com.tw/ch/tradin ... NDEX/genpage/Report" & x & "/A112" & y & "ALLBUT0999_1.php?" _
        , Destination:=Range("b1"))
        .Name = "19"
        .FieldNames = True
«á­±³£¤£ÅÜ¡C°õ¦æ±¡§Î¬Ý¹Ï¡G
q.gif

TOP

¦^´_ 5# oobird


    ·PÁ¤j¤j ,­ì¨Ó¬O³o¼Ë°µªº
^^
DREWCHEN1

TOP

On Error Resume Next
1: y = CLng(Application.InputBox(prompt:="¿é¤J¤é´Á,¤é´Á®æ¦¡(yyyymmdd)", Title:="¿é¤J¤é´Á"))
x = Left(y, 6)
If y = False Then Exit Sub
If Len(y) <> 8 Or Err Then GoTo 1
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.twse.com.tw/ch/tradin ... NDEX/genpage/Report" & x & "/A112" & y & "ALLBUT0999_1.php?" _
        , Destination:=Range("b1"))
        .Name = "19"
        .FieldNames = True

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD