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

[µo°Ý] ¦p¦ó¥ÎVBA¤U¸üÃÒ¥æ©Ò¨C¤éªº¤T¤jªk¤H¶R½æ°O¿ý

[µo°Ý] ¦p¦ó¥ÎVBA¤U¸üÃÒ¥æ©Ò¨C¤éªº¤T¤jªk¤H¶R½æ°O¿ý

¥»©«³Ì«á¥Ñ smart3135 ©ó 2017-2-19 17:42 ½s¿è

½Ð±Ð¦U¦ì«e½ú¡A§Ú·Q¥ÎVBA¤U¸üÃÒ¥æ©Ò¨C¤éªº¤T¤jªk¤H¶R½æ°O¿ý¡A¦ý¥Ø«e¥u¦³ÈФT¤jªk¤H¶R½æ¶W¤é³øÈЪºµ{¦¡½X
¦ý§Ú·Q­n¤U¸üªº¬OÈÐ¥~¸ê¤Î³°¸ê¶R½æ¶W·JÁ`ªíÈЩMÈЧë«H¶R½æ¶W·JÁ`ªíÈгo¨â­Ó³øªí¡A¦³¬Ý¹L­ì©l½X
ÅܼƦ³¨Ç¤£¦P¡A¤£ª¾¹D¸Ó«ç»ò¼g¡A¥i¥H½Ð«e½ú­Ì«üÂI¤@¤U¶Ü¡HÁÂÁÂ

¤T¤jªk¤H¶R½æ¶W¤é³øµ{¦¡½X
  1. Option Explicit

  2. Sub ÃÒ¥æ©Ò¤T¤jªk¤H¶R½æ¶W¤é³ø()

  3.   Dim qdate As String, select2 As String

  4.   qdate = "105/06/07"
  5.   select2 = "ALLBUT0999"

  6.   With ActiveSheet.QueryTables.Add(Connection:= _
  7.     "URL;http://www.twse.com.tw/ch/trading/fund/T86/T86.php", Destination:=Range( _
  8.     "$A$1"))
  9.     .Name = "ÃÒ¥æ©Ò¤T¤jªk¤H¶R½æ¶W¤é³ø"
  10.     .FieldNames = True
  11.     .RowNumbers = False
  12.     .FillAdjacentFormulas = False
  13.     .PreserveFormatting = False
  14.     .RefreshOnFileOpen = False
  15.     .BackgroundQuery = False
  16.     .RefreshStyle = xlOverwriteCells
  17.     .AdjustColumnWidth = False
  18.     .WebSelectionType = xlSpecifiedTables
  19.     .WebFormatting = xlWebFormattingNone
  20.     .WebTables = "2"
  21.     .PostText = "qdate=" & qdate & "&select2=" & select2
  22.     .WebPreFormattedTextToColumns = True
  23.     .WebConsecutiveDelimitersAsOne = True
  24.     .WebSingleBlockTextImport = False
  25.     .WebDisableDateRecognition = True
  26.     .WebDisableRedirections = False
  27.     .Refresh BackgroundQuery:=False
  28.   End With
  29.   
  30. End Sub
½Æ»s¥N½X
http://www.twse.com.tw/ch/trading/fund/T86/T86.php¡@¡@¤T¤jªk¤H¶R½æ¶W¤é³ø
http://www.twse.com.tw/ch/trading/fund/TWT38U/TWT38U.php¡@¡@¥~¸ê¤Î³°¸ê¶R½æ¶W·JÁ`ªí
http://www.twse.com.tw/ch/trading/fund/TWT44U/TWT44U.php¡@¡@§ë«H¶R½æ¶W·JÁ`ªí

·Qª¾¹D,¨D¤j¤j¸Ñ´b,¦³¦P¼ËºÃ°Ý!!

¤T¤jªk¤H­¶­±ªºµ{¦¡½X¦n¹³¦³§ó°Ê¹L

¨S¿ìªk¤@¦¸¥þ³¡¦C¥X¨Ó

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD