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

[¤À¨É] ¤j½L¨C¤ë¨C¤Ñ¾ú¥v¦¨¥æ¶q»Pª÷ÃB¤U¸ü

¥»©«³Ì«á¥Ñ pupai ©ó 2013-9-19 16:06 ½s¿è
¦^´_  turbine
GBKEE µoªí©ó 2012-10-2 10:52



    ½Ð±ÐGBKEEª©¤j
¨Ì·Ó±zªº¤è¦¡,¦pªGºô­¶´«¦¨³o¤@­Ó http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php
­n¦p¦ó­×§ï©O

Option Explicit
Private Sub ¤j½L¦¨¥æ¸ê°T()
    Dim xlTheYear As String, xlTheMonth As String, xlTheFile As String
    Dim Sh As Worksheet
    xlTheYear = Format(Range("C1"), "0000")  '­×§ï¦r¦ê®æ¦¡
    xlTheMonth = Format(Range("C2"), "00")   '­×§ï¦r¦ê®æ¦¡
    Set Sh = ThisWorkbook.Sheets.Add         '·s¼W¤u§@ªí
    Sh.Name = xlTheYear & "_" & xlTheMonth   '·s¼W¤u§@ªí©R¦W
    xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
    With Workbooks.Open(xlTheFile)
        .Sheets(1).UsedRange.Copy Sh.[a1]
        .Close 0
    End With
    Sh.Cells.EntireColumn.AutoFit            '½Õ¾ãÄæ¼e
    Sh.Columns("A:A").ColumnWidth = 28.56
End Sub

TOP

¦^´_ 71# pupai
'http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php ³oºô§}¥i¤U¸üÀɮצý¤£¬OcsvÀÉ,§A¥i¥H¸Õ¤U¸ü¬Ý¬Ý
§Aªººô§}¤Ö¤F STK_NO (ªÑ²¼¥N¸¹)
  1. xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=" & Stk_No & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
  2.     xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php?STK_NO=" & Stk_No & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 72# GBKEE
  1. Option Explicit
  2. Private Sub ¤j½L¦¨¥æ¸ê°T()
  3.     Dim xlTheYear As String, xlTheMonth As String, STK_NO As String, xlTheFile As String
  4.     Dim Sh As Worksheet
  5.     xlTheYear = Format(Range("C1"), "0000")  '­×§ï¦r¦ê®æ¦¡
  6.     xlTheMonth = Format(Range("C2"), "00")   '­×§ï¦r¦ê®æ¦¡
  7.     STK_NO = Format(Range("C3"), "0000")  '­×§ï¦r¦ê®æ¦¡
  8.     Set Sh = ThisWorkbook.Sheets.Add         '·s¼W¤u§@ªí
  9.     Sh.Name = xlTheYear & "_" & xlTheMonth   '·s¼W¤u§@ªí©R¦W
  10.     xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
  11.     xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth
  12.     With Workbooks.Open(xlTheFile)
  13.         .Sheets(1).UsedRange.Copy Sh.[a1]
  14.         .Close 0
  15.     End With
  16.     Sh.Cells.EntireColumn.AutoFit            '½Õ¾ãÄæ¼e
  17.     Sh.Columns("A:A").ColumnWidth = 28.56
  18. End Sub
½Æ»s¥N½X
ª©¤j
§Ú©w¸q¤FSTK_NO(ªÑ²¼¥N½X)
¥i¬O¶]¤£¥X¨Ó

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-9-19 20:58 ½s¿è

¦^´_ 73# pupai
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Private Sub ¤j½L¦¨¥æ¸ê°T()
  3.     Dim xlTheYear As String, xlTheMonth As String, STK_NO As String, xlTheFile As String, AR
  4.     Dim Sh As Worksheet
  5.     xlTheYear = Format(Range("C1"), "0000")  '­×§ï¦r¦ê®æ¦¡
  6.     xlTheMonth = Format(Range("C2"), "00")   '­×§ï¦r¦ê®æ¦¡
  7.     STK_NO = Format(Range("C3"), "0000")  '­×§ï¦r¦ê®æ¦¡
  8.     Set Sh = ThisWorkbook.Sheets.Add         '·s¼W¤u§@ªí
  9.     Sh.Name = xlTheYear & "_" & xlTheMonth   '·s¼W¤u§@ªí©R¦W
  10.     '******http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php*****
  11.     'xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
  12.    
  13.      '******http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php*****
  14.      xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth
  15.     '**************************************************************
  16.     With Workbooks.Open(xlTheFile)
  17.         If InStr(xlTheFile, "BWIBBU") Then
  18.             AR = .Sheets(1).Range("b446").CurrentRegion 'http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php
  19.         Else
  20.             .Sheets(1).UsedRange.Copy Sh.[A1]
  21.          End If
  22.           .Close 0

  23.     End With
  24.     With Sh
  25.         If InStr(xlTheFile, "BWIBBU") Then .Range("A1").Resize(UBound(AR, 1), UBound(AR, 2)) = AR
  26.         .Cells.EntireColumn.AutoFit            '½Õ¾ãÄæ¼e
  27.         .Columns("A:A").ColumnWidth = 28.56
  28.     End With
  29. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 74# GBKEE

G¤j
    ¥i¥H¤F
§ï¤Ñ¦A¸ò§A½Ð±Ð
ÁÂÁÂ

TOP

G¤j,§Ú¬OVBA·s¤â,¥i¥H½Ð±Ð,¦pªG¬d¸ß¤j½L,«ö¤F¤U¸ü«á·|¶K¦b­ì¥»ªº¤u§@ªí¤º,¦pªG¬O·Q¶K¦b­ì¥»¤w¸g¦s¦bªº¤u§@ªí©O?¤ñ¦p¸Ó¤u§@ªí¦WºÙ¬O"¾ú¥v¸ê®Æ",µ{¦¡½X¤S¸Ó«ç»ò­×§ï!ÁÂÁÂ!

TOP

¦^´_ 76# rinkenny
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Private Sub ¤j½L¦¨¥æ¸ê°T()
  3.     Dim xlTheYear As String, xlTheMonth As String, STK_NO As String, xlTheFile As String,  Sh As Worksheet
  4.     With Sheets("Sheet1")
  5.         xlTheYear = Format(.Range("C1"), "0000")  '­×§ï¦r¦ê®æ¦¡
  6.         xlTheMonth = Format(.Range("C2"), "00")   '­×§ï¦r¦ê®æ¦¡
  7.         STK_NO = Format(.Range("C3"), "0000")  '­×§ï¦r¦ê®æ¦¡
  8.     End With
  9.     ''''''''''''''''''''''''''''''''''''''''''''''''''''''
  10.     Set Sh = Workbooks("§A«ü©wªº¬¡­¶Ã¯").Sheets("¾ú¥v¸ê®Æ")
  11.     ''''''''''''''''''''''''''''''''''''''''''''''''''''''
  12.     '******http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php*****
  13.     xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
  14.         With Workbooks.Open(xlTheFile)
  15.         .Sheets(1).UsedRange.Copy Sh.Range("A" & Rows.Count).End(xlUp).Offset(1) '±µµÛAÄæ ½Æ»s¤U¥h
  16.         .Close 0
  17.     End With
  18. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ÁÂÁ¯«¤HGB¤j,­ì¨Ó¦p¦¹,·P¿EGB¤jªº¤À¨É

TOP

¤Ó´Î¤F
«D±`·PÁÂGBKEE¤j¤jªº¼ö¤ß¤À¨É

TOP

ÁÂÁ¤j¤jªº¤À¨É¡A¨ü¯q¨}¦h

TOP

        ÀR«ä¦Û¦b : ¦Û¤v®`¦Û¤v¡A²ö¹L©ó¶ÃµoµÊ®ð¡C
ªð¦^¦Cªí ¤W¤@¥DÃD