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

¦p¦ó¤U¸üSGX NLT ´Á³f¤Î¿ï¾ÜÅv¸ê®Æ

¦p¦ó¤U¸üSGX NLT ´Á³f¤Î¿ï¾ÜÅv¸ê®Æ

http://www.sgx.com/wps/portal/sgxweb/home/marketinfo/derivatives/Nlt

¦p¦ó¥HVBA «ö"HERE"
Please click HERE to download the text file.
¤U¸üNLT_FUT.UNL ¤Î NLT_OPT.UNL

¦^´_ 1# chwqk

postªº¤º®e¤Ó¦h¡A§ï¥Î¥t¤@ºØ¤èªk
  1. Sub SGX_NLT_´Á³f¤Î¿ï¾ÜÅv¸ê®Æ()
  2.     Dim URL As String, shts As Worksheet
  3.     Dim x As Variant, xi As Integer, A As Object, xlHtm
  4.     Set shts = ActiveSheet '  '("¤u§@ªí2")
  5.     shts.Cells.Clear
  6.     URL = "http://www.sgx.com/wps/portal/sgxweb/home/marketinfo/derivatives/Nlt"
  7.     With CreateObject("InternetExplorer.Application")
  8.         .Visible = True     '  ¬O§_Åã¥Ü IE
  9.         .Navigate URL
  10.          Do While .ReadyState <> 4 Or .Busy
  11.                 DoEvents
  12.             Loop
  13.         Application.Wait Now + TimeValue("00:00:06")

  14.         xlHtm = .Document.body.innerHTML                'Àx¦s
  15.         Set A = .Document.getElementsBytagname("table")
  16.         For xi = 116 To 118 Step 2
  17.             .Document.body.innerHTML = A(xi).outerHTML
  18.             .ExecWB 17, 2       '  Select All
  19.             .ExecWB 12, 2       '  Copy selection
  20.             With shts
  21.                 .Range("A" & .[A1048576].End(xlUp).Row + 1).Select
  22.                 .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
  23.             End With
  24.             .Document.body.innerHTML = xlHtm                  'ÁÙ­ì
  25.         Next xi
  26.         shts.Cells.EntireColumn.AutoFit     '  ¦Û°Ê½Õ¾ãÄæ¼e
  27.         .Quit
  28.     End With
  29. End Sub
½Æ»s¥N½X

TOP

RE: ¦p¦ó¤U¸üSGX NLT ´Á³f¤Î¿ï¾ÜÅv¸ê®Æ

With shts
                .Range("A" & .[A1048576].End(xlUp).Row + 1).Select
                .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
            End With

¸g´ú¸Õ ¦¹¬q°õ¦æ¥X¿ù
               ½Ð°Ý
               .Range("A" & .[A1048576].End(xlUp).Row + 1).Select
         ¨ä¤¤ 1048576 ¬O§_¦]¬°¶W¥X excel¤u§@ªí¦C¼Æ ¦Ó¥X¿ù

TOP

¦^´_ 3# chwqk

ª©§ï¦¨

.Range("A" & .[A65535].End(xlUp).Row + 1).Select

TOP

ÁÂÁÂ JOEY0415
¤w¥i¥H¨Ï¥Î

¦ý·Q¤F¸Ñ
    For xi = 116 To 118 Step 2
  ¬°¦ó¬O xi = 116 To 118

¥t¥~ Step 2 ¬O¬Æ»ò·N«ä  ??

TOP

½Ð±Ð³Ìªñsgx¤S§ïª©
http://www.sgx.com/wps/portal/sgxweb/home/marketinfo/derivatives/Nlt
http://www.sgx.com/wps/portal/sgxweb_ch/home/marketinfo/derivatives/Nlt

§ì¤£¨ì¸ê®Æ
¦p¦ó­×¥¿

TOP

¦^´_ 6# chwqk
  1. Sub SGX_NLT_1()
  2.     Dim URL As String, shts As Worksheet
  3.     Dim x As Variant, xi As Integer, A As Object, xlHtm
  4.     Set shts = ActiveSheet '  '("¤u§@ªí2")
  5.     shts.Cells.Clear
  6.     URL = "http://www.sgx.com/wps/portal/sgxweb/home/marketinfo/derivatives/Nlt"
  7.     With CreateObject("InternetExplorer.Application")
  8.         .Visible = True     '  ¬O§_Åã¥Ü IE
  9.         .Navigate URL
  10.          Do While .ReadyState <> 4 Or .Busy
  11.                 DoEvents
  12.             Loop
  13.         Application.Wait Now + TimeValue("00:00:06")

  14.         xlHtm = .Document.body.innerHTML                'Àx¦s
  15.         Set A = .Document.getElementsBytagname("table")
  16.         For xi = 74 To 74
  17.             .Document.body.innerHTML = A(xi).outerHTML
  18.             .ExecWB 17, 2       '  Select All
  19.             .ExecWB 12, 2       '  Copy selection
  20.             With shts
  21.                 .Range("A" & .[A1048576].End(xlUp).Row + 1).Select
  22.                 .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
  23.             End With
  24.             .Document.body.innerHTML = xlHtm                  'ÁÙ­ì
  25.         Next xi
  26.         shts.Cells.EntireColumn.AutoFit     '  ¦Û°Ê½Õ¾ãÄæ¼e
  27.         .Quit
  28.     End With
  29. End Sub
½Æ»s¥N½X
  1. Sub SGX_NLT_2()
  2.     Dim URL As String, shts As Worksheet
  3.     Dim x As Variant, xi As Integer, A As Object, xlHtm
  4.     Set shts = ActiveSheet '  '("¤u§@ªí2")
  5.     shts.Cells.Clear
  6.     URL = "http://www.sgx.com/wps/portal/sgxweb_ch/home/marketinfo/derivatives/Nlt"
  7.     With CreateObject("InternetExplorer.Application")
  8.         .Visible = True     '  ¬O§_Åã¥Ü IE
  9.         .Navigate URL
  10.          Do While .ReadyState <> 4 Or .Busy
  11.                 DoEvents
  12.             Loop
  13.         Application.Wait Now + TimeValue("00:00:06")

  14.         xlHtm = .Document.body.innerHTML                'Àx¦s
  15.         Set A = .Document.getElementsBytagname("table")
  16.         For xi = 113 To 115 Step 2
  17.             .Document.body.innerHTML = A(xi).outerHTML
  18.             .ExecWB 17, 2       '  Select All
  19.             .ExecWB 12, 2       '  Copy selection
  20.             With shts
  21.                 .Range("A" & .[A1048576].End(xlUp).Row + 1).Select
  22.                 .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
  23.             End With
  24.             .Document.body.innerHTML = xlHtm                  'ÁÙ­ì
  25.         Next xi
  26.         shts.Cells.EntireColumn.AutoFit     '  ¦Û°Ê½Õ¾ãÄæ¼e
  27.         .Quit
  28.     End With
  29. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : «H¤ß¡B¼Ý¤O¡B«i®ð¤TªÌ¨ã³Æ¡A«h¤Ñ¤U¨S¦³°µ¤£¦¨ªº¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD