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

[µo°Ý] ½Ð±Ð³o­Óºô­¶­n¦p¦ó§Q¥Îpost¨ú±o¸ê®Æ¡H

[µo°Ý] ½Ð±Ð³o­Óºô­¶­n¦p¦ó§Q¥Îpost¨ú±o¸ê®Æ¡H

½Ð±Ð¦U¦ì°ª¤â¡A§Ú·Q­n§ìªþ¹Ïºô­¶¤Wªº¸ê®Æ¡A¥¦«e¬qªºID¬O¥ÎGet¡A«á­±ªº¤é´Á¬O¥ÎPost
§Ú¦³¸ÕµÛ¼g¬Ý¬Ý¡A¦ýÁ`¬O§ì¤£¨ì§Ú­nªº¤é´Á°Ï¶¡ªº¸ê®Æ¡A¥u¯à§ì¨ìºô­¶¹w³]³Ìªñªº¤@­Ó¬P´Á¸ê®Æ
½Ð°Ý§Ú¬O­þ¸Ì¼g¿ù©O¡H

  1. Sub ¥¨¶°2()
  2. ' ¥¨¶°2 ¥¨¶°
  3. Dim Url As String, Post As String
  4. Url = "http://peweb/home/StencilInfo/QueryMesFlow.aspx?"
  5. Post = "txtPID=11380" & "&txtStartDate=2016-05-07" & "&txtEndDate=2018-05-07" & "&btnQuery=¬d¸ß"
  6. '
  7.     With ActiveSheet.QueryTables.Add(Connection:="URL;" & Url, Destination _
  8.         :=Range("$A$1"))
  9.         .Name = "QueryMesFlow.aspx?PID=11380"
  10.         .PostText = Post
  11.         .RefreshOnFileOpen = False
  12.         .BackgroundQuery = True
  13.         .RefreshStyle = xlInsertDeleteCells
  14.         .AdjustColumnWidth = False
  15.         .RefreshPeriod = 0
  16.         .WebSelectionType = xlAllTables
  17.         .WebFormatting = xlWebFormattingNone
  18.         .WebTables = "1"
  19.         .WebDisableDateRecognition = True
  20.         .WebDisableRedirections = False
  21.         .Refresh BackgroundQuery:=False
  22.     End With
  23.     ActiveWindow.SmallScroll Down:=-24
  24. End Sub
½Æ»s¥N½X

¦^´_ 1# smart3135

µLªk³s¤W±z´£¨Ñªººô§}¡A¥u¯à«Øij±z¥i¥H¥Î¶}µo¤H­û¤u¨ã(«öF12)¬Ý¤@¤UPOSTªº¤º®e
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 2# iamaraymond
¤£¦n·N«ä¡A¥Ñ©ó¬O¤½¥q¤º³¡ºô­¶¡A©Ò¥H¦b¤½¥q¥~³s¤£¤W¥h
§Úªºªþ¹Ï¬õ®Ø³B´N¬O«öF12§ä¨ìªº´X­ÓPOSTªºÃöÁäµü
¦ý¤£½×«ç»ò·f°t¡A³£µLªk¤U¸ü§Ú­nªº°Ï¶¡¸ê®Æ¨ìEXCEL
À³¸Ó¬O§Úµ{¦¡½X¤¤ªº"Post = "txtPID=11380" & "&txtStartDate=2016-05-07" & "&txtEndDate=2018-05-07" & "&btnQuery=¬d¸ß"
³o¬q¦³°ÝÃD¡A¦ý¤S¤£ª¾¹D¬O­þ¸Ì¥X°ÝÃD¡A©Ò¥H¤~¤W¨Ó½Ð±Ð°ª¤â

TOP

¦^´_ 3# smart3135

¤£ª¾¹D¬O¤£¬OURL Encodeªº°ÝÃD
­Y±N"¬d¸ß"³o¨â­Ó¦r§ï¦¨
%E6%9F%A5%E8%A9%A2
©O?
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 4# iamaraymond
±z¦n¡A¦³·Ó±z´£¨Ñªº¸Õ¹L¤F¡A¤@¼Ë¬O¤£¦æ
¦]¬°¬O¤½¥q¤º³¡ºô­¶¡A©Ò¥H¤]¨S¿ìªkÅý±z¨Ì§Úªºµ{¦¡½X´ú¸Õ¡A³o¬O¤ñ¸û§xÂZªº¦a¤è

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD