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

[µo°Ý] ¦p¦ó¥Îvba¶×¤Jweb¸ê®Æ

[µo°Ý] ¦p¦ó¥Îvba¶×¤Jweb¸ê®Æ

¥»©«³Ì«á¥Ñ skystone ©ó 2011-1-17 00:33 ½s¿è

§Ú­n¦bsheet1¤¤ªºa3 Åã¥Ü

http://money.hinet.net/z/z0/z00/z00a_2311_2010-1-1_2011-1-16_D.djhtm

¤¤ªº¾ú¥vªÑ»ù

½Ð°Ý¤j¤j­Ì,§Ú¥i¥H«ç»ò°µ?

(ps.­è±µÄ²vba¤£¤[,¥i¥H½Ð¤j¤j­Ì»¡¥J²Ó¤@ÂI? ^^)

¥»©«³Ì«á¥Ñ ¨F©Ôªo ©ó 2011-1-21 23:40 ½s¿è

¤£«OÃÒ¦^¶Ç¸ê®Æªº§¹¾ã©Ê
  1. Sub webqyt()
  2.     Dim qyt As QueryTable
  3.     Dim sh As Worksheet
  4.     Dim i As Integer
  5.     Dim para As String
  6.     Dim paras As Variant
  7.     Dim rng As Range
  8.    
  9.     paras = Array("ªÑ²¼¥N¸¹", "¶}©l¤é´Á¡]¦è¤¸¡^", "µ²§ô¤é´Á¡]¦è¤¸¡^")
  10.     Application.ScreenUpdating = False
  11.     Set sh = Sheets.Add
  12.     '«Ø¥ßWEB¬d¸ß
  13.     Set qyt = sh.QueryTables.Add(Connection:= _
  14.         "FINDER;http://oilonline.myweb.hinet.net/m.iqy", _
  15.         Destination:=Range("A1"))
  16.     '³]©w°Ñ¼Æ 1 to 3
  17.     For i = 1 To 3
  18.         para = InputBox("½Ð¿é¤J­n¬d¸ßªº" & paras(i - 1), "¬d¸ß°Ñ¼Æ " & i & "/3")
  19.         Select Case i
  20.         Case 1: If Not IsNumeric(para) Then GoTo ERROUT
  21.         Case 2: If Not IsDate(para) Then GoTo ERROUT
  22.         Case 3: If Not IsDate(para) Then GoTo ERROUT
  23.         End Select
  24.         qyt.Parameters(i).SetParam xlConstant, IIf(i > 1, Format(para, "yyyy-m-d"), para)
  25.     Next
  26.     Sheet1.Cells.Clear
  27.     i = 1
  28.     '¶}©l¬d¸ß
  29.     Do
  30.         qyt.Parameters(4).SetParam xlConstant, i
  31.         qyt.Refresh False
  32.         With qyt.ResultRange
  33.             If .Rows.Count > 4 Then
  34.                 Set rng = Range("A" & IIf(i = 1, 1, 3)).Resize(.Rows.Count - IIf(i = 1, 2, 4), .Columns.Count)
  35.                 rng.Copy Sheet1.Range("A65536").End(xlUp).Offset(IIf(i = 1, 0, 1), 0)
  36.             End If
  37.         End With
  38.         Set rng = Cells.Find(what:="¤U¤@­¶", LookIn:=xlValues, Lookat:=xlPart)
  39.         i = i + 1
  40.     Loop While Not rng Is Nothing
  41.     Application.DisplayAlerts = False
  42.     sh.Delete
  43.     Application.DisplayAlerts = True
  44.     Application.ScreenUpdating = True
  45.     Exit Sub
  46. ERROUT:
  47.     Application.DisplayAlerts = False
  48.     sh.Delete
  49.     Application.DisplayAlerts = True
  50.     Application.ScreenUpdating = True
  51.     MsgBox "§A´£¨Ñªº¸ê®Æ©úÅ㤣¥¿½T¡A¤£¬d¤F¡ã"
  52. End Sub
½Æ»s¥N½X
¦h¬Ý¬Ýµ{¦¡½Xªº·N¸q¡A¤£­n¥u¬O½Æ»s¦^¥h¯à¥Î´Nºâ¤F¡A
¤U¦¸¦P¼Ëªº°ÝÃD´N¤£µª¤F¡ã
¤@§Z¤T¥|¡BÅå¨ìåF¥N»x

TOP

¤p§Ì¹ï¨F©Ôªo¶W¯Åª©¥Dªº§@«~
¤@ª½²`·P¿³½ì¡A¤]³£¯Ç¤J¦¬¶°¬ÃÂáC
¦¹¦¸¡A¬Ý¨ì¤@¼Óªº¼Ó¥D´£¥Xªº°ÝÃD
¤]¬O¤p§Ì²`·P¿³½ì¡C¥u¥i±¤¤@¼Ó¼Ó¥D
¨Ã¥¼Ä~Äò´£¥X±´°Q¡B¬ã¨s¡AÅý¤p§Ì¤´µM°±¯d
­ì¦a¡AÁÙ¬O¤£±o¨äªù¦Ó¤J¡C
¤p§Ì¦³¤G°ÝÃD·Q½Ð敎¡G
¤@¡B¤@¼Ó¼Ó¥D´£¥Xªººô­¶¶×¤Jªººô§}¬°¡G
http://money.hinet.net/z/z0/z00/z00a_2311_2010-1-1_2011-1-16_D.djhtm
¦ýª©¥Dªº»yªk¤W¬O¤Þ¥Îhttp://oilonline.myweb.hinet.net/m.iqy
¦Ó¤p§Ì±N¤@¼Ó¼Ó¥D·Q¶×¤Jªººô­¶Æ[¬Ý¨ä­ì©lÀɤº¨Ã¥¼¬d¸ß¥Xª©¥D¤Þ¥Îªººô§}¸ê®Æ¡C
³o¤]¬O¤p§Ì¤@ª½·P¨ì§xÂZªº¦a¤è¡C
¤G¡B¤p§Ì·Q½Ð¨F©Ôªo¥S¯à§_«üÂIÀ³¦p¦ó¾Ç²ßexcel »P web ¬ÛÃöª¾ÃÑ©O¡H

¤p§Ì¦b¦¹¦P®É¦V¦U¦ìª©¥D¤j¤j«ô¦~
¨Ã®¥¯¬¦U¦ì·s¦~´r§Ö¡A¸U¨Æ¦p·N¡C

TOP

¥»©«³Ì«á¥Ñ ¨F©Ôªo ©ó 2011-2-4 18:44 ½s¿è
¤@¡B¤@¼Ó¼Ó¥D´£¥Xªººô­¶¶×¤Jªººô§}¬°¡G
http://money.hinet.net/z/z0/z00/z00a_2311_2010-1-1_2011-1-16_D.djhtm
¦ýª©¥Dªº»yªk¤W¬O¤Þ¥Îhttp://oilonline.myweb.hinet.net/m.iqy
¦Ó¤p§Ì±N¤@¼Ó¼Ó¥D·Q¶×¤Jªººô­¶Æ[¬Ý¨ä­ì©lÀɤº¨Ã¥¼¬d¸ß¥Xª©¥D¤Þ¥Îªººô§}¸ê®Æ¡C
³o¤]¬O¤p§Ì¤@ª½·P¨ì§xÂZªº¦a¤è¡C
¤G¡B¤p§Ì·Q½Ð¨F©Ôªo¥S¯à§_«üÂIÀ³¦p¦ó¾Ç²ßexcel »P web ¬ÛÃöª¾ÃÑ©O¡H


°ÝÃD¤@
Ãø±o¦³¤H¬Ý¨ì§Ú§@¹ú¡A§A¥i¥HÂI¿ï³o­Óºô§} http://oilonline.myweb.hinet.net/m.iqy ¬Ý¬Ý¸Ì­±¬O¤°»ò¶Ü¡H

°ÝÃD¤G
¸Ó»¡ªº³£»¡§¹¤F¡A¬Ý¬Ý©³¤U¨â­Ó³sµ²§a¡I
http://blog.xuite.net/saladoil/excel/38430175
http://blog.xuite.net/saladoil/excel/38751663
¤@§Z¤T¥|¡BÅå¨ìåF¥N»x

TOP

­º¥ý¤p§Ì¦b¦¹¯¬ºÖ¦U¦ìª©¥D¤j¤j
·s¦~¦æ¤j¹B¡B¤ß·Q¨Æ¦¨¡B¦n¹B¦~¦~¨Ó¡C

¨F©Ôªoª©¥D¤j¤j¡A·PÁ§A¬K¸`´Á¶¡
ÁÙÅý§A¨¯­W¦^ÂФp§Ìªº´£°Ý¡C

¤p§Ì­«ÂЦh¦¸«ôŪ¤j¤jªº§@«~¡A
¤ß¸Ì¦³¤@ºØ·Pı¦n¹³¬O¦³ÂIÀ´¡F
¤S¦n¹³ÁÙ¤£¬O«ÜÀ´¡C

¥Ø«e³o¨Ç§@«~¤p§Ì³£¤w¦¬¤J¬ÃÂáC
¥u¯à»¡¬Oºë±m¦Ü·¥¡A²@µL§N³õ¡C
¤]´Á±æ©Ò¦³ºô¤Í³£¦³¦¹ºÖ®ð¯à¾Ç¨ì¡C

¤p§Ì·Q¦A½Ðª©¥D¤j¤j¯à¹ï¦¹ºô­¶
¸Ñ´b¥h°£¤p§Ì¤ß¤¤ªº¤@¶ô¤j¥ÛÀY¡C
°ÝÃD¤@¡B
¤p§Ì·Q¹ï¥x±m¤Þ¥Î¤j¤jªº¼Ò¦¡¤´¦³
²~ÀV¡C¤p§Ì·Q¨ú¥X¥x±mªº¤j¼Ö³z¨Ã
¿ï¨ú¤Î«ü©w¦~¡B¤ë®É¤£ª¾¦p¦ó­×¥¿©O¡H

­º¥ý¤p§Ì¦³¬Ý¥X¨äÄÝ©óPOST
<form name="form1" method="post" action="history.aspx" id="form1">
¦ý¬OÁÙ¶·­n³]©w¤T­Ó°Ñ¼Æ¤£ª¾­n¦p¦ó­×¥¿©O¡H
»yªk¦p¤U¡G
WEB
1
http://www.taiwanlottery.com.tw/Lotto/Lotto649/history.aspx
__EVENTTARGET=["¿ï¾Ü¤ë¥÷","½Ð¿é¤J­n¬d¸ßªº¤j¼Ö³z¤ë¥÷¥N¸¹"]

Selection=8
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False

°ÝÃD¤G¡B
¦b°õ¦æ¶×¤Jªº¸ê®Æ¨ä¤¤¤å·|¥X²{¶Ã½X
ªº±¡§Î¡A¤£ª¾­n¦p¦ó§ï¥¿©O¡H

·P®¦¤j¤j¡I

TOP

¦^´_ 4# ¨F©Ôªo
©I!ªá¤F¤@¬q®É¶¡¬Ý¤F¨F©Ôªo¤j¤jªº¤å³¹ ÁöµM¬Ý±o¤£¬O«ÜÀ´ ¦³¨Ç¤¶­±¤]¤£¤Ó¤@¼Ë ´N¬O¦b³Ì«á[¸ê®Æ>>¶×¤J¥~³¡¸ê®Æ>>¶×¤J¸ê®Æ] ³o¸Ì ¦]¬°§ÚªºEXCEL¬O2007ªº ©M2003¤£¤@¼Ë
2007ªº¤¶­±¬O[¸ê®Æ>>±qAccess©Î±qWeb©Î±q¤å¦rÀɩαq¨ä¥L¨Ó·½]¦ý³£µLªk«ü©w¨ì­è­è¤U¸ü¤U¨ÓªºiqyÀÉ ¤£ª¾¹D¸Ó«ç»ò¶×¤J Àµ½Ð¤j¤j«üÂI  ·PÁ¤j¤j!

TOP

        ÀR«ä¦Û¦b : ¤£­nÀH¤ß©Ò±ý¡A­nÀH¤ß±Ð¨|¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD