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

[µo°Ý] [VBA] ¦p¦ó±q¤½¶}¸ê°TÆ[´ú¯¸Â^¨úªÑ§Q¤À°t¨ì§Úªºexcel?

[µo°Ý] [VBA] ¦p¦ó±q¤½¶}¸ê°TÆ[´ú¯¸Â^¨úªÑ§Q¤À°t¨ì§Úªºexcel?

¦U¦ì«e½ú¦n¡A¤j®a¦n:
±ß½úªº°ÝÃD¬O:
¦p¦ó¼¶¼gVBA¤è«K±q ¤½¶}¸ê°TÆ[´ú¯¸Â^¨ú104¦~«×¦U¤W¥«Âd " ¬Õ¾l¤À°t¤§²{ª÷ªÑ§Q(¤¸/ªÑ) " ¼Æ­È ¦Ü§Úªºexcel ¤ºªºsheet?
ºô¯¸ªº¦ì¸m¬O(http://mops.twse.com.tw/mops/web/t05st09_new)
¥H¤W¡A·PÁ¦U¦ì«e½ú¨Ó¬d¬Ý§Úªº°ÝÃD¡C·PÁ¡C­Y¯à¸Ñ¶}§ÚªººÃ°Ý¡A·P¿E¸U¤À!

¦^´_ 1# justintoolbox
­Y¯à¸Ñ¶}§ÚªººÃ°Ý
¥i§_po¤W§Aªºµ{¦¡½X,¤~ª¾§AªººÃ°Ý¦b­þ¸Ì!!
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ justintoolbox ©ó 2015-4-2 15:08 ½s¿è

GBKEE «e½ú:
·PÁ§A¬d¬Ý§Úªº°ÝÃD¡A
§Ú¥Ø«e¥u¯à°µ¨ì¾É¦V¦Üºô¯¸(http://mops.twse.com.tw/mops/web/t05st09_new)
¶ñ¤W¦~¤À¨Ã·j´M¡A¨Ã¥B¦¨¥\¦aÅã¥Ü·j´M«áªºµ²ªG¡C

§Ú¥d¦b±µ¤U¨Óªº¨BÆJ: ´N¬O§Ú¤£ª¾¹D§ï¦p¦ó¼¶¼gªº³¡¤À
§ä´M¯S©wªºªÑ²¼¥N¸¹(³o³¡¤À§Ú·|¦C¬°ÅܼƤè«K§Ú¦Û¦æÅܧó)¡A¨Ã¥BÂ^¨ú¸ÓªÑ²¼¥N¸¹ªº "¬Õ¾l¤À°t¤§²{ª÷ªÑ§Q(¤¸/ªÑ)"¥H¤Î"¬Õ¾lÂà¼W¸ê°tªÑ
(¤¸/ªÑ)"¦Ü§Úªºexcel¡A§Ú¥u­n¯àVBA§ì¨ìºô­¶¤W«ü©wªº¦ì¸m¸ê®Æ¡A±µ¤U¨Ó§Ú´N¤j·§¥i¥H¦Û¦æ¸Ñ¨M¤F¡C
¤£¾å±o§Ú³o´£°Ý¸ÑÄÀ¡A¦³¤ñ¸û²M·¡¨Ç¶Ü?
¦A¦¸·PÁ ¶W¯Åª©¥DGBKEE ¡C

TOP

¤£ª¾§A¬O¥Î¦óºØ¤è¦¡

xmlhttp, browser object , Sendkeys or others?

TOP

http://mops.twse.com.tw/server-java/t05st09sub?step=1&TYPEK=sii&YEAR=104&first=

TOP

104¦~

http://mops.twse.com.tw/server-java/t05st09sub?step=1&TYPEK=otc&YEAR=104&first=
http://mops.twse.com.tw/server-java/t05st09sub?step=1&TYPEK=sii&YEAR=104&first=
http://mops.twse.com.tw/server-java/t05st09sub?step=1&TYPEK=rotc&YEAR=104&first=
http://mops.twse.com.tw/server-java/t05st09sub?step=1&TYPEK=pub&YEAR=104&first=

TOP

¥u·|¿ý»s
  1. Sub ¥¨¶°1()
  2. '
  3. Sheets(1).Select
  4. Sheets(1).Cells.Clear
  5.     With ActiveSheet.QueryTables.Add(Connection:= _
  6.         "URL;http://mops.twse.com.tw/server-java/t05st09sub?step=1&TYPEK=sii&YEAR=104&first=" _
  7.         , Destination:=Range("$A$1"))
  8.         .FieldNames = True
  9.         .RowNumbers = False
  10.         .FillAdjacentFormulas = False
  11.         .PreserveFormatting = True
  12.         .RefreshOnFileOpen = False
  13.         .BackgroundQuery = True
  14.         .RefreshStyle = xlInsertDeleteCells
  15.         .SavePassword = False
  16.         .SaveData = True
  17.         .AdjustColumnWidth = True
  18.         .RefreshPeriod = 0
  19.         .WebSelectionType = xlEntirePage
  20.         .WebFormatting = xlWebFormattingNone
  21.         .WebPreFormattedTextToColumns = True
  22.         .WebConsecutiveDelimitersAsOne = True
  23.         .WebSingleBlockTextImport = False
  24.         .WebDisableDateRecognition = False
  25.         .WebDisableRedirections = False
  26.         .Refresh BackgroundQuery:=False
  27.     End With
  28.    
  29.    
  30.     Sheets(2).Select
  31.     cy = Cells(2, "A")
  32.     cy = cy & " -"
  33.     Sheets(1).Select
  34.     Set kx = Cells.Find(What:=cy, After:=Cells(1, 4))
  35.     If Not kx Is Nothing Then Sheets(2).Cells(2, "B") = Cells(kx.Row, "J")
  36.     Sheets(2).Select
  37. End Sub
½Æ»s¥N½X

TOP

104¦~

http://mops.twse.com.tw/server-java/t05st09sub?step=1&TYPEK=otc&YEAR=104&first=
http://mop ...
koo µoªí©ó 2015-4-2 19:53


koo«e½ú¡A
«D±`·P¿E¡IÁÂÁ§A»{¯uªºµªÂСC¯uªº«Ü¦³¥Î¡A»´ÃP´N«ü¦Vºô­¶¡C

¥u¬O¯à§_½Ð±Ð ³o¬O¥Î¤°»ò¤èªk©Î³Z¬ª¾¹D³o¨Ç¸Ô²Óºô§}ªº¡H ¦n·Qª¾¹D®@~

TOP

¥u·|¿ý»s
koo µoªí©ó 2015-4-3 17:33


koo«e½ú¡A«D±`·PÁ§A¦b³o¥|¤Ñ³s°²¸ÌÁÙ¯à©âªÅ¦^µª§Úªº°ÝÃD¡C
·P¿E¸U¤À¡A³o´X¤Ñ§Ú¦b¸Õ¸Õ¬Ý±z´£¨Ñªº¤èªk¡A­Y¦³°ÝÃD¦A¦V±z½Ð±Ð¡C·PÁ¡I

TOP

diolin  ±z¦n¡A¦]¬°§Ú¬O³o¤è­±ªºªì¾ÇªÌ¡A¼¶¼gªº¤º®e³£¬O±qºô¸ô¤W§ä´M±µªñ¦Û¤v»Ý­nªºµ²ªG¡C©Ò¥H±z¸ß°Ýªº"xmlhttp, browser object , Sendkeys or others?"§Ú¨S¦³¥ô¦ó·§©À¡A¯uªº«Ü©êºp¡C¤£¹L¤]±q§A³o¸Ìª¾¹D¡A­ì¨ÓÁÙ¦³³o»ò¦h¤èªk¥i¥H¹F¨ì§Ú­nªºµ²ªG¡A¯u¬O¤Ó°ª¿³¤F! ¯à§_±Ð§Ú¤@¤U§Ú¸Ó¦p¦ó§PÂ_³o¨Ç¤èªk­þ­Ó¤ñ¸û¤ñ¸û¦X¾A¡A©Î¬O³o¨Ç¤èªk¤À§O¸Ó¦p¦ó¼g¤~¯à¹F¨ì§Ú­nªº¡C§Úª¾¹D³o«Ü¦h¡A­Y§AÄ@·N±Ð§Ú¡A§Ú·|«D±`·PÁ§Aªº!! ©ÎªÌ¯à§_µ¹§Ú­Ó´£¥Ü©Î±ÀÂ˳o¤è­±ªº®ÑÄyÅý§Ú¦Û¤v¥i¥H¬ãŪ©O?? «D±`·PÁÂ!!
koo ±z¦n¡A§A´£¨Ñªº¤èªk¯uªº¦n®e©ö´N¥i¥H³sµ²·j´Mªºµ²ªG¡A¯à§_µ¹­Ó´£¥Ü³o¨Ç¬O±q­þ¸Ì¥i¥H±À´ú±oª¾ªº¡AÅý§Ú¤è«K¤§«áªº°ÝÃD¯àÁ|¤@¤Ï¤T~ ¯uªº«D±`·PÁ§A!!

TOP

        ÀR«ä¦Û¦b : ¸Ü¦h¤£¦p¸Ü¤Ö¡A¸Ü¤Ö¤£¦p¸Ü¦n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD