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

[µo°Ý] QueryTable ¤U¸üÃÒ¨é¸ê®Æ°ÝÃD

[µo°Ý] QueryTable ¤U¸üÃÒ¨é¸ê®Æ°ÝÃD

§Ú­ì¥»³£¥Î¥É¤sÃÒ¨é¥HQueryTable ¤U¸ü¬ÛÃöªº°]°È³øªí¸ê®Æ
¦ý³Ìªñ¬ðµM¤£¯à¥Î¤F¡A¥X²{¤F¦p¤Uªº«H®§¡C§Ú¥H¬°¬O³Q¥É¤sÃÒ¨é«ÊÂê¤F¡A¦ý¬O¨Ï¥ÎBrowser ¤S¥i¥H¶i¥É¤sÃÒ¨é¡A©Ò¥HÀ³¸Ó¤£«ÊÂêIP
¦]¦¹§ï¥Î¤é²±ÃÒ¨é¡C¦ý¯«©_ªº¬O ¦P¤@¤äµ{¦¡¡A¥u¬O³sµ²ªºURL¤£¦P¡A¦ý¦³­Ó¤Hªº¹q¸£¬O¥i¥H³s¨ì¥É¤sÃҨ骺¡A¦ý§Úªº¹q¸£¤Î§Ú§ä¤F´X­Ó¤HÀ°¦£´ú¸Õ(®a¸Ì»P¤½¥q¦P¨Æ³£¦³)³£³s¤£¤W¥É¤sÃÒ¨é¡A¦P¼Ë¥X²{¦p¤U¹Ïªº¸ê°T

·Q½Ð°Ý¬O§_¹q¸£­n°µ¬Æ»ò¯S®í³]©w¤~¥i¥H ?
ªþÀɦ³¤À³s¥É¤sÃÒ¨é»P¤é²±ÃÒ¨é¡Ccode ³£¤@¼Ë¡A¥u¬OURL¤£¤@¼Ë





QueryTable Test.rar (26.13 KB)

´ú¸ÕÀÉ

¸É¥R
§ÚªºEXCEL ª©¥»¬O Excel 2010¡C
§Ú«á¨Ó¥Î Set XMLHTTP = CreateObject("Microsoft.XMLHTTP") ªº¤è¦¡¡A¨Ï¥Î¦P¤@¥x¹q¸£¡A¥i¥H§ì¨ì¥É¤sÃҨ骺¸ê®Æ¡C©Ò¥HÀ³¸Ó¨S¦³³Q«ÊÂꤧÃþªº°ÝÃD¡A¥u¬O·Q¤£³z¬°¦ó¨Ï¥Î Querytable ¤£¦æ...

TOP

½Ð°Ý¦³¤H¸Õ¹L  °õ¦æ¥É¤ssheet ¨º­Ó¥¨¶°¡A¥i¥H§ì¨ì¸ê®Æªº ?

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-7-7 23:23 ½s¿è

¦^´_ 3# vanguarx

¥É¤s¨º­Ó¡A¬Q¤Ñ§Ú´ú·|¥d¦º¡A­è­è´ú¥i¥H¤S§ì¨ì¸ê®Æ¤F~~

¥i¯à³Ìªñ¦b­×§ïªF¦è§a~

ºô¸ôª¦ÂΪº¥ÍºA´N¬O³o¼Ë¡A¨S¦³¤@­Óµ{¦¡¥i¥H¥Ã¤[¨Ï¥Î

ºô­¶³]­pªÌ¤¤¶¡´¡¤J¤@­Ó·sªí®æ¡A«á­±ªºªí®æ§Ç¸¹´N·|¤£¦P

©ÎªÌ§ó§ï¤¶­±¡A§ï­ì¥óID¡B§ï¤¸¤¸¥óÃþ«¬¡A¬Æ¦Ü¥u¬O§ï­Ó¦r¦ê~

­ì¥»¥i¥H§ì¨ì¸ê®Æªºµ{¦¡´NÅܨS¥ÎºO~

¦^¨ìQueryTable¡A¥H«á¹J¨ì³oºØ±¡ªp¡A

¦pªG§A­ì¥»¬O¥Î¿ý»sªº¡A¥i¥H¦A­«·s¿ý»s¬Ý¬Ý~

¦pªG§A­ì¥»¬O¦Û¤v¼gªº¡A®¦~ ¨º´N¦AÀˬd¬Ý¬Ý­þ¸Ì¤£¤@¼Ë¤F
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

ÁÂÁÂn7822123 ªº¶}¥Ü¡C
§Ú­è´ú¸Õ¤F¥É¤s¡AÁÙ¬O¤£¦æ¡C
¥t¥~¡A­Y§Ú¥Î¸ê®Æ-> ±qweb ->¿é¤JURL  ¥h¿ý»scode
¤é²±¬O¥i¥H¦¨¥\ªº¡A¦ý¥É¤s«o¥¢±Ñ¡C
§Ú¬O·Q·d²M·¡¡A¨ì©³¬O¹ï¤èºô¯¸°Ê¤F¤â¸}¡AÁÙ¬O§Úªº¹q¸£­þ¸Ìªº³]©w¤£¹ï¡A¾É­P³o¼Ë¡C
¦]¬°¦P¼Ëcode, ¦³¨Ç¤H°õ¦æOK¡A¦ý§Ú°õ¦æ´N¬O¤£¦¨¥\...

¤é²±http://jsjustweb.jihsun.com.tw/z/zc/zcc/zcc_2441.djhtm
¥É¤shttp://sjmain.esunsec.com.tw/z/zc/zcc/zcc_2441.djhtm

TOP

ÁÂÁÂn7822123 ªº¶}¥Ü¡C
§Ú­è´ú¸Õ¤F¥É¤s¡AÁÙ¬O¤£¦æ¡C
¥t¥~¡A­Y§Ú¥Î¸ê®Æ-> ±qweb ->¿é¤JURL  ¥h¿ý»scode
¤é ...
vanguarx µoªí©ó 2020-7-8 09:07



³£¥i¥H§ì¡A¨S¦³°ÝÃD

ºô¯¸§ó·s®É·|¦³°ÝÃD¡B§ì¨ú¹L§Ö·|¦³°ÝÃD
  1. Sub ¥¨¶°1()
  2.     Cells.Clear
  3.     sname = 1101
  4.    
  5.     Set myQT = ActiveSheet.QueryTables.Add(Connection:="URL;http://jsjustweb.jihsun.com.tw/z/zc/zcc/zcc_" & sname & ".djhtm", Destination:=Range("$A$1"))
  6.     With myQT
  7.         .WebFormatting = xlWebFormattingNone
  8.         .Refresh BackgroundQuery:=False
  9.         .Delete
  10.     End With
  11.     Set myQT = Nothing
  12. End Sub
½Æ»s¥N½X

TOP

§Ú¥Î¤F§Aªºcode, ¥u¬O´«¦¨¥É¤sÃÒ¨éºô§}
µ²ªGÁÙ¬O¨S¤ÏÀ³¡C

­Y§Úªº¹q¸£¤£¯àrun¡A¤]³\¬OÀô¹Ò°ÝÃD¡C¥u¬O§Ú·d¤£À´¡A¦P¼Ëªºcode , §Ú¥h¦n´X­Ó¤Hªº¹q¸£¸Õ¹L¡AÁÙ¬O³£¤£¦æ¡C

Sub ¥¨¶°1()
    Cells.Clear
    sname = 1101
   
    Set myQT = ActiveSheet.QueryTables.Add(Connection:="URL;http://sjmain.esunsec.com.tw/z/zc/zcc/zcc_" & sname & ".djhtm", Destination:=Range("$A$1"))
    With myQT
        .WebFormatting = xlWebFormattingNone
        .Refresh BackgroundQuery:=False
        .Delete
    End With
    Set myQT = Nothing
End Sub

TOP

§Ú¥Î¤F§Aªºcode, ¥u¬O´«¦¨¥É¤sÃÒ¨éºô§}
µ²ªGÁÙ¬O¨S¤ÏÀ³¡C

­Y§Úªº¹q¸£¤£¯àrun¡A¤]³\¬OÀô¹Ò°ÝÃD¡C¥u¬O§Ú·d ...
vanguarx µoªí©ó 2020-7-8 14:58


§Ú´ú¸Õ¹L¤F¡A·í¬Y¨Ç®É¬q
ºô¯¸¦b¸ê®Æ§ó·s®É
§ä¤£¨ì¬ÛÃöºô­¶
¹j¤@¬q®É¶¡«á´N¯à°õ¦æ

TOP

·PÁÂÀ°¦£¡C

¬Ý¨Ó¯uªº¬O¥É¤sºô¯¸ªº°ÝÃD¤F¡C

TOP

        ÀR«ä¦Û¦b : °µ¸Ó°µªº¨Æ¬O´¼¼z¡A°µ¤£¸Ó°µªº¨Æ¬O·Mè¡C
ªð¦^¦Cªí ¤W¤@¥DÃD