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

[µo°Ý] ½Ð°Ý¦p¦ó­×§ï¤~¯à¸ü¤Jªí®æ ÁÂÁÂ

[µo°Ý] ½Ð°Ý¦p¦ó­×§ï¤~¯à¸ü¤Jªí®æ ÁÂÁÂ

Option Explicit

Dim ie As Object   '¼Ò²Õ³Ì³»ºÝ Dim ¨Ñ³o¼Ò²Õªºµ{§Ç¨Ï¥ÎªºÅܼÆ
Sub AllFile()
    Dim i As Integer, v, Y As Integer, S As String
    Set ie = CreateObject("internetexplorer.application")   '¨Ï¥Î¦¹¤è¦¡¥i¥H§K°£ "³]©w¤Þ¥Î¶µ¥Ø"

           GetDividend (2330)



End Sub


Private Sub GetDividend(ByVal ss As String)     '¨úªÑ§Qºô­¶
  Dim strText As String
  Dim i As Integer, j As Integer, xTable As Object
  With CreateObject("msxml2.xmlhttp")
    .Open "GET", "http://pscnetinvest.moneydj.com.tw/z/zc/zcq/zcqa/zcqa_" & ss & ".djhtm", False
    .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    .send
    strText = BinToStr(.responseBody, "BIG5") '­nª`·Nºô­¶½s½X
  End With
  With CreateObject("htmlfile")
        .Write strText
        Set xTable = .all.tags("table")(2)
        With Sheet2
            .Cells.Clear
            For i = 0 To xTable.Rows.Length - 1
                For j = 0 To xTable.Rows(i).Cells.Length - 1
                    .Cells(i + 1, j + 1) = xTable.Rows(i).Cells(j).innertext
                Next
            Next
        End With
  End With
End Sub




Function BinToStr(arrBin, strChrs)
    With CreateObject("ADODB.Stream")
        .Type = 2
        .Open
        .Writetext arrBin
        .Position = 0
        .Charset = strChrs
        BinToStr = .ReadText
        .Close
    End With
End Function

­ì«¬GetDividend-2019-a().zip (15.75 KB)

TOP

¦^´_ 11# f3202

ÁÂÁ ¤j¤j ´£¨Ñªº¸ê°T¡A¬ã²ß¤¤😀

TOP

¦^´_ 10# n7822123
­ìµ{¦¡¥i¯àºô­¶§ïª©¦Ó¤£¯à®»¨ì table ªº¸ê®Æ¡A§Ú¹ï©ó»yªkÄÝ©ÊÁÙ¤£¼ô±x¡A§V¤O¾Ç²ß¤¤😀
ºô­¶¤¤ ¡Õform¡Ö....¡Õ/form¡Ö§Ú·Q¬O¼vÅT¤U¸üªº

TOP

°Ñ¦Ò
https://www.mobile01.com/topicdetail.php?f=511&t=4737630&p=1

TOP

¦^´_ 6# f3202


¾Ç²ß¤F~~~~¬Ý¨ÓÃöÁä¦b©ó

htmlfileª«¥ó.body.innerhtml = .Responsetext

¥u¬O¤°»ò®É­Ô¥Î .write ¤°»ò®É­Ô¥Î .body.innerhtml

¤£ª¾¹D¦³¨S¦³¿ìªk¤À¿ë¡AÁÙ¬O´N¤G¿ï¤@²q¬Ý¬Ý {:3_59:}
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 8# wufonna
§ï¹L¤F¡A½Ð ¤j¤j ¬Ý¬Ý¡AÁÂÁÂ

6.jpg (238.32 KB)

6.jpg

GetDividend-2019-a-good.zip (58.94 KB)

TOP

¦^´_ 6# f3202
«D±`·PÁ ¤j¤j¡Aµ{¦¡§¹¥þ¥i°õ¦æ¤F

5.jpg (243.51 KB)

5.jpg

GetDividend-2019-a-good.zip (180.79 KB)

TOP

¦^´_ 5# n7822123
§Ú¥D­n¬O¨úºô­¶¤ºªº µ|«á¬Õ¾l / ªÑªFÅv¯q ¡A°µ ªÑªFÅv¯q³ø¹S²v  (ROE) = µ|«á¬Õ¾l / ªÑªFÅv¯q¡A§Ú¦b°µ¬Ý¬Ý¡AÁÂÁ ¤j¤j

¦~¦X¨Ö·l¯qªí http://pscnetinvest.moneydj.com.tw/z/zc/zcq/zcqa/zcqa_1723.djhtm
¦~¦X¨Ö¸ê²£­t¶Åªí http://pscnetinvest.moneydj.com.tw/z/zc/zcp/zcpb/zcpb_1723.djhtm

1.jpg (203.17 KB)

1.jpg

2.jpg (182.82 KB)

2.jpg

3.jpg (135.46 KB)

3.jpg

TOP

Sub get_stock()
Dim Url, HTMLsourcecode, GetXml
Set HTMLsourcecode = CreateObject("htmlfile")
Set GetXml = CreateObject("msxml2.xmlhttp")
Url = "http://pscnetinvest.moneydj.com.tw/z/zc/zcq/zcqa/zcqa_2330.djhtm"
With GetXml
.Open "GET", Url, False
.Send

HTMLsourcecode.body.innerhtml = .Responsetext
Set Table = HTMLsourcecode.all.tags("table")(2).Rows
For i = 0 To Table.Length - 1
For j = 0 To Table(i).Cells.Length - 1
ActiveSheet.Cells(i + 1, j + 1) = Table(i).Cells(j).innertext
Next j
Next i
End With
Set HTMLsourcecode = Nothing 'ÄÀ©ñ°O¾ÐÅé
Set GetXml = Nothing
End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TOP

        ÀR«ä¦Û¦b : ¤ß¤¤±`¦sµ½¸Ñ¡B¥]®e¡B·P«ä¡Bª¾¨¬¡B±¤ºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD